I have an application that works like the UBER, it happens that when you're going on a run, the screen where the passenger accompanies the driver moving up to him, when the user will open other applications and attempt to return to the app by clicking on the main icon of the application that is in the launcher, the application returns to the first screen and not to the screen that was previously being screen is lost ...
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<activity android:name=".ui.RaceActivity" android:screenOrientation="portrait"></activity>
It is because you had used finish() in your java coding as i know if you use finish() for activity then it always finish your activity and when you will open app then it will start it from first screen .