I have a Service running in the Background. It fetches some strings over IP. It should truncate them and coordinate them to some variables.
So I thought:
public class Listener extends Service{
public void main(){
//fetch and preprocess data
data=fetched_string;
}
public String data=null;
public String getData(){return data;}
}
To my understanding, this should work. But how can I access this string data from another class or whats wrong with my Idea?
Or maybe there is a more elegant solution for android?