mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Most RN apps have single activity, and developers expect to resume application from background when app icon pressed. But Android default configuration creates a new activity instance, which confuses developers, see https://github.com/facebook/react-native/issues/27370 and https://github.com/facebook/react-native/issues/27368. This PR changes template manifest so that when app icon pressed, background app will resume instead of creating a new activity, therefore match developers expectations. Also it's required to make Linking work. ## Changelog [Android] [Changed] - MainActivity launchMode is singleTask Pull Request resolved: https://github.com/facebook/react-native/pull/27373 Test Plan: RNTester will resume background app, instead of creating a new instance when app icon pressed Differential Revision: D18766373 Pulled By: mdvacca fbshipit-source-id: 697e9c5bf92ec958de265b060dffb50f7b74d157
28 lines
1019 B
XML
28 lines
1019 B
XML
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
package="com.helloworld">
|
|
|
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
|
|
<application
|
|
android:name=".MainApplication"
|
|
android:label="@string/app_name"
|
|
android:icon="@mipmap/ic_launcher"
|
|
android:roundIcon="@mipmap/ic_launcher_round"
|
|
android:allowBackup="false"
|
|
android:theme="@style/AppTheme">
|
|
<activity
|
|
android:name=".MainActivity"
|
|
android:label="@string/app_name"
|
|
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
|
android:launchMode="singleTask"
|
|
android:windowSoftInputMode="adjustResize">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
</activity>
|
|
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
|
|
</application>
|
|
|
|
</manifest>
|