Copy link to clipboard
Copied
Hello,
I created an Air native extension on Android, I launch my other activity in the ane :
Context context = divExtContext.getActivity().getApplicationContext();
Intent myIntent = new Intent(context, OtherActivity.class);
myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(myIntent);
if my app is in background and I click on the app buton or I launch a custom URI, my activity is destroyed.
I tried to add in the app descriptor android:launchMode="singleTop" :
<android>
<manifestAdditions>
<![CDATA[
<manifest>
<uses-permission android:name="android.permission.PERMISSION_NAME" />
<application>
<activity android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.nativeExtensions.OtherActivity" android:theme="@android:style/Theme.Dialog"/>
</application>
</manifest>
]]>
</manifestAdditions>
</android>
but when my app is in background and I click on the app buton or I launch a custom URI, my activity is not destroyed but I have a black screen.
Is there a workaround ?
Thanks
I find a workaround using singleInstance, it's necessary to reorder the activity.
Copy link to clipboard
Copied
You can vote for this bug here
Copy link to clipboard
Copied
I find a workaround using singleInstance, it's necessary to reorder the activity.