Tell me more ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I have the EA daily deals widget installed on my second home screen. The widget is basically a rotating banner of deals in the Play store. Since it is constantly rotating the displayed banner I assume that it is draining more battery than a static widget (it also doesn't have any options for rotation or network updates).

My question is, are widgets suspended when they are not being displayed i.e. when I am on the first or third home screen? Or, does it depend on the implementation?

*Using the stock launcher on Android 4.2.

share|improve this question

2 Answers

In my experience, widgets keep running even when the phone is locked, or a different home screen is selected.

share|improve this answer

Widgets don't actually "run" themselves, like normal apps do. The widget host (i.e. the home screen app, or the lock screen) is in charge of drawing all the widgets. The widget provider (part of the app) tells the host what layout to give each widget, and how often it wants the widget to update. There's nothing running to "suspend", regardless of whether the widget is visible or not.

The interface that widget providers use to specify what the layout should be allows them to give a list of things to rotate through. The YouTube widget uses this, for example, so that the widget can keep showing new videos without the provider having to keep changing the layout. If your widget uses this facility, then the home screen only runs any extra code when it's time to rotate the list.

Of course, it's also possible for a background service to keep giving the host (home screen) a new layout for the widget. This is how (say) an email widget can be updated when you have new emails. But there's no need for it to run all the time to do this, and having a rotating list shouldn't in itself make you think the app is always running in the background.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.