first time app launch intro error (viewpager)
<p>i was trying to add some intro screens that would only run only the first time the app is launched, after that it will directly load the login page
i used the following guide to achieve this</p>

<pre><code>SharedPreferences sp = getSharedPreferences(MyPrefs, 0);
    if (sp.getBoolean("first", true)) {
        SharedPreferences.Editor editor = sp.edit();
        /*editor.putBoolean("first", false);*/
        sp.edit().putBoolean("first", false).commit();
        editor.commit();
        Intent intent = new Intent(this, login.class); //call your ViewPager class
        startActivity(intent);
    }
</code></pre>

<p>But the app skips the intro part and loads the login page when using the app for the first time, and loads the intro pages when launched again
how can i reverse this
thanks</p>