I am developing an application.
my requirement is that first time when i installing the application in to device it has to start the main and launcher activity.
After that when i am starting/opening my application in side the device it has to load another activity instead of main and launcher.
If the application is uninstalls and installs again it has to load the main and launcher again.
can you please anybody share the solution on this kind of topics.
Thanks in advance.
You can do this:
Say Activity A is the activity that you want to launch only the first time, and activity B the activity that the system will launch after the first time.
In you manifest put Activity B as your launcher activity. Then inside the oncreate or better OnResume of activity B put the following:
Then on your A activity be sure to set a flag on your preferences to indicate that your application has run more than once. So somewhere inside activity A put this: