i have implemented service. it will run 3 minutes once in background. in the service i am getting the value from web service and storing in database .
the user in the SAME UI , the data has to update . i am displaying data from database into listview.
Below is my service class :
public class ServiceClass extends Service {
private DbHelper mHelper;
private SQLiteDatabase dataBase;
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
getList();
return START_STICKY;
}
in fragement i have a method called getDataFromDB()
how to call this method in service , and the UI get updated dynamically.
could any one help to me over come this prm