How to i i set the TextView and ProgressBar to their findViewById views from inside a service?>
ProgressBar dialog;
TextView Titletext;
@Override
public IBinder onBind(Intent intent) {
// TODO Auto-generated method stub
return null;
}
@Override
public void onCreate(){
super.onCreate();
Log.e("StackWidgetService", "Inside of onCreate in Widget Service");
getter fethcer = new getter();
fethcer.execute();
}
Just get a reference to the AppWidgetManager and update the layout.
This example only updates the layout of the first widget instance (
appWidgetIds[0]) or probably even crashes if there is no widget. Usually you have to loop over theappWidgetIds-array and update each one individually; or skip the loop if no widget instance is present.