It seems a better route would be to do something like the following:

- Have a preference to allow the user to specify if they want to have
auto-update checks
- Have a way for the user to manually check for updates, perhaps via a menu
option
- If auto-update is enabled:
    - When the app is launched, start a service to check if updates are
available
    - If an update is available, notify the user in the notification bar
    - When the user clicks the notification, display a dialog asking if the
user would like to update
    - If the user clicks yes, start your update service

Thanks,
Justin

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------


On Thu, Nov 5, 2009 at 2:49 AM, Raghav
<[email protected]>wrote:

> I have a service that checks if new version of database is available
> in the server.
> If new version is available, the service calls an activity to notify
> the user about availability of newer version of the database. Also,
> the activity prompts the user to confirm if the database has to be
> updated or not.
>
> Once the user responds "Yes" or "No" for the database update, the
> information is passed on from the activity to the service and the
> service proceeds according to the user response and finally stops.
>
> The problem here is that, I am not able to pause the service or keep
> the service waiting, till the activity is responded by the user. the
> service will be complete before the user confirms if he needs an
> update or not.
>
> Is it possible in any way to keep my service waiting till the user
> responds to the activity started by my service?
> Any information regarding implementation of the same will of great
> help.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-beginners%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to