[Solved] How to Skip LauncherActivity and call another Activity when application start


You can use SharedPreference for achieving this. You need to implement the logic in your SplashActivity. You need to check whether already logged in or not using the value stored in shared preference and show next activity based on that.

In your SplashActivity (Where you launch the login activity), add the logic like:

// Retrieving your app specific preference
String sharedPrefId     = "MyAppPreference";
SharedPreferences prefs = getSharedPreferences(sharedPrefId, 0);

boolean isLoggedIn      = prefs.getBoolean("isLoggedIn", false);
if(isLoggedIn)
{ 
    // Show Main Activity
}
else
{
    // Show Login activity
}

And in your LoginActivity, after successful login set the value to true:

prefs.edit().putBoolean("isLoggedIn", true).commit();

6

solved How to Skip LauncherActivity and call another Activity when application start