F
F
Fotonick2015-09-24 20:12:03
Android
Fotonick, 2015-09-24 20:12:03

How to make a one-time activity that only shows if the app was first installed or updated?

I want to add an activity to my application with news about new features of the application, which will be shown only once after the initial installation or after updating the application. How to do it? How to determine that the application was first installed or updated?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Neic, 2015-09-24
@thomas_white

The easiest way is to write it in Preferences. If the first launch occurred, you write down the value, and then you check it at each launch. To check the new version, as an option, the same Preferences, only there you check the current version of the application with what is written in the preferences. If they are different, then you show a dialog / activity with new features and update the version number in the preferences.

B
belozerow, 2015-09-24
@belozerow

Put the version in SharedPreference
If the version has increased - show your activity and put the new version in SharedPreference

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question