I have an application which has the usual task behaviour for most activities, but it also has one activity that needs to be launched onto the task that created it.
This activity is launched from a mime type. If another application launches the activity, the activity should show within the same task. However the activity is always re-parented to the task of its application. This is despite explicitly setting allowTaskReparenting
to false
.
When there are no other activities in the application, the activity correctly launches in the task where it was launched. It only re-parents when other activities of the application exist within a task.
How can I get the activity to only launch on-top of the activity where it was launched, separate from the other activities of the same app? Here is the relevant part of the AndroidManifest.xml:
<activity
android:name="com.matthewmitchell.peercoin_android_wallet.ui.RestoreWalletActivity"
android:configChanges="orientation|keyboard|keyboardHidden"
android:theme="@style/My.Theme.Dialog"
android:allowTaskReparenting="false" >
<intent-filter android:label="@string/import_keys_intent_filter_action" >
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/x-peercoin-wallet-backup" />
<data android:mimeType="application/octet-stream" />
</intent-filter>
</activity>