In android kotlin, I had changed the app icon and app name using activity alias concept. But after switch the icons and app name. When the app is minimized the app is not found in my background. Attached video link for issue reference:https://drive.google.com/file/d/1V59pBDjhC6kvK5uvnRH3Miqd291pbN2g/view?usp=sharing
My Mainactivity.kt and android.xml code below:
packageManager.setComponentEnabledSetting(ComponentName("com.example.batpoc","com.example.batpoc.MainActivityOneLaunch"), PackageManager.COMPONENT_ENABLED_STATE_ENABLED,PackageManager.DONT_KILL_APP)
packageManager.setComponentEnabledSetting(ComponentName("com.example.batpoc","com.example.batpoc.MainActivity"), PackageManager.COMPONENT_ENABLED_STATE_DISABLED,PackageManager.DONT_KILL_APP)
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.batpoc">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="batpoc"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity-alias
android:name=".MainActivityOneLaunch"
android:enabled="false"
android:roundIcon="@mipmap/th"
android:icon="@mipmap/th"
android:label="One Launch"
android:targetActivity=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity-alias>
</application>
Please guide.Thanks in advance.