Reputation: 21335
I have a WidgetProvider which is around for milliseconds. It takes in an intent, and it kicks off a service which takes maybe noticeable time. I wanted to display something to the user during this delay like a progress bar that will block user, but the BroadcastReceiver/WidgetProvider seems like the wrong place to start up a progress bar. Where should I issue the Progress Bar in this case? Service maybe? but service might not be part of UI at all?
Upvotes: 0
Views: 832
Reputation: 4751
Have you tried putting a progress bar in the notifications pull down? Doing something like the market displays when you're downloading an app should work really well, and execute in the background well.
Upvotes: 1
Reputation: 1006539
Where should I issue the Progress Bar in this case?
From a UI perspective, your only choice is to have it in the app widget itself. ProgressBar is one of the valid widgets to have in an app widget layout.
In terms of who updates the RemoteViews
of your app widget to display/update/remove the ProgressBar
, that is probably your Service
in whatever background thread you are using for the "noticeable time".
Upvotes: 1