I'm attempting to launch my app automatically when visiting a URL (test.com) in this example
however every time I do so I am asked which application I should use to do so. I'd like a way to launch my app every time without prompting for user interaction.
I've done research into how this can be done and have found the following:
Android Eliminate Complete Action Using dialog
But if I implement an explicit intent instead of an implicit intent - how do I specify to launch my activity when visiting test.com since I wont be using
<data android:scheme="http" android:host="test.com" android:pathPrefix="/" />
IMPLICIT INTENT (works successfully - launches app when visiting test.com but prompts user to select app - which is undesired - need to launch my app without the complete action using prompt)
<activity android:name="com.nfc.linked.Warning">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:scheme="http" android:host="test.com" android:pathPrefix="/" />
</intent-filter>
</activity>
EXPLICIT INTENT (ATTEMPT):
public class Warning extends Activity {
Intent intent = new Intent(this, Warning.class);
startActivity(intent);
}