title: How to open recent avtivity after app reopen in android studio
body: <p>How to open recent <code>activity</code> after app reopen in android studio
  For Example, we create a book application
  Then after reopening the app, open the last page where we are</p>
  <pre><code> &lt;application
      android:allowBackup=&quot;true&quot;
      android:icon=&quot;@mipmap/ic_launcher&quot;
      android:label=&quot;@string/app_name&quot;
      android:roundIcon=&quot;@mipmap/ic_launcher_round&quot;
      android:supportsRtl=&quot;true&quot;
      android:theme=&quot;@style/Theme.Demo4&quot;&gt;
      &lt;activity android:name=&quot;.MainActivity2&quot;&gt;&lt;/activity&gt;
      &lt;activity android:name=&quot;.MainActivity&quot;
          android:launchMode=&quot;singleTask&quot;&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
  
              &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  
  
  
         
  </code></pre>