Ich versuche, meine App abhängig von der URL zu öffnen, die eingegeben wird, aber in einigen Fällen versucht, mehrere Aktivitäten zur gleichen Zeit auszuführen, gibt es eine Möglichkeit, dies zu beschränken, so dass die MainAction tut nicht ausgeführt werden, wenn ein anderer auszuführen versucht ?, im Grunde geht mein Manifest wie dieseSteuern mehrere Aktivitäten Absichten in Android
Hauptaktivität
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<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:scheme="http" />
<data android:scheme="https" />
<data android:host="www.test.com" />
<data android:host="m.test.com" />
</intent-filter>
<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="home"
android:scheme="testapp" />
</intent-filter>
</activity>
Details Aktivität
<activity
android:name=".DetailActivity"
android:label="@string/title_activity_detail"
android:launchMode="singleInstance"
android:theme="@style/AppTheme.NoActionBar">
<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="detail"
android:scheme="testapp" />
</intent-filter>
<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:scheme="http" />
<data android:scheme="https" />
<data android:host="www.test.com" />
<data android:host="m.test.com" />
<data android:pathPrefix="/homes"/>
</intent-filter>
</activity>
das Problem ist, dass wenn ich versuche, einen Link zu öffnen, wie „http://www.test.com/homes“ dies geschieht:
, aber ich möchte nur das Detail, wenn offen die andere URL und die Haupttätigkeit auszulösen, wenn Versuch Navigieren Sie durch die Homepage –