• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Air Android native extensions preserve other activity to be destroyed

Engaged ,
Apr 10, 2019 Apr 10, 2019

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

TOPICS
Performance issues

Views

540

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Apr 14, 2019 Apr 14, 2019

I find a workaround using singleInstance, it's necessary to reorder the activity.

Votes

Translate

Translate
Engaged ,
Apr 13, 2019 Apr 13, 2019

Copy link to clipboard

Copied

You can vote for this bug here

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 14, 2019 Apr 14, 2019

Copy link to clipboard

Copied

LATEST

I find a workaround using singleInstance, it's necessary to reorder the activity.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines