Manuel Wenner
Manuel Wenner

Reputation: 51

Don't destroy activity

my app/activity (starts a tracking) can be started from another app. In my case the app is called from browser. I added an intent filter for incoming links.

<intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />

    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />

    <data
        android:host="destination"
        android:scheme="mwde" />
</intent-filter>

This works fine. My problem is, that when user start the activity again, the onDestroyed function is called, but I don't want that in this case. Is there any way to prevent this?

Upvotes: 0

Views: 436

Answers (1)

Phantom Lord
Phantom Lord

Reputation: 701

Try to use this flag in the app manifest https://developer.android.com/guide/topics/manifest/activity-element#lmode

Upvotes: 2

Related Questions