I am implementing an app which have MainActivity , onlyFirstRunActivity and alwaysRunActivity . Now i want that on app installtion or on updation of app my app cycle should be like that:
MainActivity -> onlyFirstRunActivity -> alwaysRunActivity
and after installing or on updation my app cycle should be :
MainActivity -> alwaysRunActivity
How can i implement this situation
You can get the update time for your app and save it in a SharedPreference.
Also, you should just make your main activity the always run one.
To get the current_update_time:
How to get app install time from android
For last update time, see:
http://developer.android.com/guide/topics/data/data-storage.html#pref