I am developing an Android app with a Navigation Drawer working this way: the user opens the app and a Tutorial (an activity with a pager sliding fragments, called ScreenSlideActivity.java) pops up; when the user finishes sliding the tutorial, he presses the "finish" button resulting in the initialization of the MainActivity (creating a drawerLayout, drawerToggle etc.)
What I need to do is opening the Tutorial activity just once, after the app's first launch.
I've tried with this code in the main Activity:
if (savedInstanceState == null) {
SelectItem("tutorial");
}
making sure that ScreenSlideActivity.java is immediately started. The problem with this solution is that when the tutorial is opened, from there I'm not able to access MainActivity.java anymore, neither from the "up" botton neither from the Tutorial's last page's "finish" button, probably because for some reason I don't have the main as the parent activity anymore.
Then I've tried this solution change application's starting activity - Android modifying the manifest xml file. Adding:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
to ScreenSlideActivity. The problem with this solution is that it changes the structure of my project, making my ScreenSlideActivity.java as the Main and Launching Activity (and therefore from here I cannot access the MainActivity anymore) while all I want to do is to display it once.
What else can I do?