tags:

views:

56

answers:

2

I am wondering how one would create a dialog box that only pops up when the app is first opened. For example, I have an Android app on the market. When I update it, I would like to implement a box that pops up that displays what has been updated in the app and will not pop up again until the app is updated again. Thanks!

+2  A: 

Save a version number (string) to the preferences file and query for it in the onCreate method.

If the version string matches the current version string then just proceed with the application without any action.

If the version string does not match the current version string then display the dialog.

I hope that makes sense.

Octavian Damiean
Why bother with the boolean? Just the version number should be enough. If it matches, don't display the dialog. If it doesn't match or is unset, display the dialog, and set it to the current version.
Laurence Gonsalves
+1 You're right ... I don't know why I think that complicated. Maybe I'm tired. Edited my answer with your input.
Octavian Damiean
A: 

If you need some sample code as well - have a look at

Is this the first run?

Could be easily adapted to fit your needs, I think

Martin