I added
FlurryAgent.getAds(..)
within my activity. My activity is launched by a widget and information is cached via a service.
If the user clicks an ad and it goes to full screen, my widget no longer responds to clicks and the service no longer updates the views on the widget. It stays like this unless the user removes the widget from the launcher screen and adds it back again.
I handle low memory situations with the service this way in onStartCommand()
:
RemoteViews views = new RemoteViews(getPackageName(), R.layout.activity_main);
AppWidgetManager appWidgetManager = AppWidgetManager
.getInstance(context);
int[] appWidgetIds = appWidgetManager
.getAppWidgetIds(new ComponentName(context,
MainWidget.class.getName()));
for (int i = 0; i < appWidgetIds.length; i++) {
appWidgetManager.updateAppWidget(appWidgetIds[i], views);
}
return START_STICKY;
where the appWidgetIds
are always supposed to update the appWidgetManager to keep the remoteviews clickable, and the START_STICKY
flag is supposed to handle this exact situation regarding service reinstantiation.
The Flurry full screen ad seems to somehow kill it anyway though
please advise