I have a splash activity in my app that launches and then loads the main class after 5 seconds. I'm thinking of changing it to where the splash only displays on the initial launch of the app. I was thinking of just writing a text file to the filesystem and then checking to see if its there. If its found, then dont load the splash screen. Is there a better way of doing a check to see if the app is on the first launch?
Asked
Active
Viewed 585 times
2 Answers
5
Instead of that you can use SharedPreferences because its easy to implement, fetch and take values from it as compared to file system.
Refer this question for the example of SharedPreference: Android-sharedpreference

Community
- 1
- 1

Paresh Mayani
- 127,700
- 71
- 241
- 295
-
1Thanks! I believe I will give that a go! Looks like the best way to do it. – Steve Weaver Feb 25 '13 at 05:58
2
You can use SharedPreference to save Simple String that represents your Splash screen.

Pragnani
- 20,075
- 6
- 49
- 74