In my App, first it shows a splash screen. After that another activity, then my main activity must be shown. This is my design plan. The second activity (i.e before main activity) must be shown for the first-time user of the app. If he/she closes the app, splash screen will redirect to main activity automatically. How do I do this? Any ideas? I am developing my app for Android phones.
There's no reliable way to detect first run, as the shared preferences way is not always safe, the user can delete the shared preferences data from the settings! a better way is to use the answers here Is there a unique Android device ID? to get the device's unique ID and store it somewhere in your server, so whenever ...
Navigate to APPS and select the app u want by long press. And then hit the Info button on top right corner. Thats it , it will show u the modified or installed time.
Android is developed by a consortium of developers known as the Open Handset Alliance and commercially sponsored by Google. It was unveiled in November 2007, with the first commercial Android device, the HTC Dream, being launched in September 2008.
To check if the user is signed-in, call isConnected(). if (mGoogleApiClient != null && mGoogleApiClient. isConnected()) { // signed in.
You can e.g. use a sharedPreference-object to store a boolean value that tells you if this is the first time the user opens the application. Check the preference when the user starts the application, and if it returns true then show the middle screen.
private SharedPreferences mPreferences;
....
boolean firstTime = mPreferences.getBoolean("firstTime", true);
if (firstTime) {
SharedPreferences.Editor editor = mPreferences.edit();
editor.putBoolean("firstTime", false);
editor.commit();
showMiddleActivity();
}
Something like that.
Edit: Beaten to it by jqpubliq...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With