I really can't find anything for this, maybe I'm using the wrong keywords. Hope you can help anyway. I developed an application which has the task to navigate a website in a easy way from mobile, but now I want it to be recognised outside from other applications as default for certain links. For example: An email arrives from this website on your phone, when you click on the link in it, which rediricts to a page on that website, I want that the OS asks me to choose which application I want to use, in this case Google Chrome or my application. Only thing I was able to do was to make it open YouTube links with the YouTube application externally, not viceversa from outside
Thanks fot the help and the idea, this is how i made it work: Manifest.xml
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.mywebsite"
android:scheme="https"
/>
Mainactivity.java
(inside OnCreate
)
WebView myWebView = (WebView) findViewById(R.id.webView);
Intent intent = getIntent();
Uri data = intent.getData();
if (data!=null) {
myWebView.loadUrl(String.valueOf(data)); //Load given link from external app
} else {
myWebView.loadUrl("http://www.mywebsite"); //Load homescreen
}