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:
@Override
protected void onResume() {
super.onResume();
if(firstLaunch()){
startActivity(new Intent(this, A.class));
finish();
}else{
//Do your normal stuff
}
}
private boolean firstLaunch(){
SharedPreferences prefs = getSharedPreferences(
"Preferences",
Context.MODE_PRIVATE);
return prefs.getBoolean("firstLaunch",false);
}
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:
private void setFirsLaunchFlag(){
SharedPreferences prefs = getSharedPreferences(
"Preferences",
Context.MODE_PRIVATE);
SharedPreferences.Editor edit = prefs.edit();
edit.putBoolean("firstLaunch",true);
edit.commit();
}