Following situation:
I have an app widget
which polls data from an url and updates the widget with the parsed html
. On pre-honeycomb
devices this can be done via a service
without using a seperate thread. Now, on ICS, this has changed and an ASyncThread
is necessary.
To access the TextViews
in the Widget-Updater-Service
I use
RemoteViews remoteViews = new RemoteViews(getApplicationContext().getPackageName(), R.layout.widget_layout);
remoteViews.setTextViewText(R.id.TextView1,"test");
But this does not seem work in an ASyncThread
. Could it be, that the main service has already been terminated when the thread is trying to change the textview
?
Any ideas on solving this problem?