I have many activities and have to traverse through all activities from navigation drawer. I want to quit app from home screen whether there are many activities which have not been finished.For this purpose i used NavUtils as we can move to parent activity from "NavUtils.navigateUpFromSameTask(MyClass.this)" method. for example i have two activities here splashScreen.class and ManinActivity.class i startactivity from splashScreen activity by finishing the splashScreen & splashscreen is parentclass of MainActivity & by quitting app from mainactivity the app is finished in some mobiles but in some mobiles the app goes to parent activity's onCreate method so called splashScreen.I don't understand why this is happening.Help me if u know better procedure or if i'm doing something wrong here is my code of quitting app from MainActivity:
NavUtils.navigateUpFromSameTask(MainActivity.this);
and i start MainActivity from splashScreen like this:
public void StartMainActivity()
{
Intent mainActivity = new Intent(splashScreen.this,MainActivity.class);
startActivity(mainActivity);
finish();
}
here is manifest code:
<activity
android:name=".MainActivity"
android:label="StoneAge"
android:parentActivityName="com.experlabs.brandappy.splashScreen">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.experlabs.brandappy.splashScreen" />
</activity>