Application was returning to First Activity

android

26 просмотра

1 ответ

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 ... My manifest.

 <application
        android:name=".Application"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:screenOrientation="portrait"
        >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
<activity android:name=".ui.RaceActivity"   android:screenOrientation="portrait"></activity>
    </application>
Автор: Mateus Carvalho Источник Размещён: 08.11.2019 11:26

Ответы (1)


0 плюса

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 .

Автор: Shubham Sharma Размещён: 20.08.2016 03:13
Вопросы из категории :
32x32