Answer the question
In order to leave comments, you need to log in
Launching an app from a link through mobile chrome?
The essence of the question is: It is
required to launch the application when clicking on the link in the browser. Everything works if you open the link from a third-party application (mail, skype, etc.). But when you try to open a link from a website (I tried it through Chrome and Opera), an Intent is launched with a search for an application on Google Play (as the documentation says, due to the fact that an application that can process this link was not found).
Code example:
Manifest:
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
<intent-filter>
<action android:name="com.example.android.GO"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:host="views.example.com"
android:scheme="http"/>
<data
android:scheme="http"
android:host="com.example.android"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="views" android:host="com.example.android"/>
</intent-filter>
</intent-filter>
<a href="intent://scan/#Intent;scheme=views;package=com.example.android;end"> Go on </a>
<a href="intent://scan/#Intent;scheme=http;package=com.example.android;end"> Go on http</a>
<a href="intent://scan/#Intent;package=com.example.android;end"> Go on no scheme</a>
<a href="intent://scan/#Intent;package=com.example.android;action=com.example.android.GO;end"> Go on action</a>
<a href="intent://scan/#Intent;action=com.example.android.GO;end"> Go on action no package</a>
<a href="http://views.example.com"> Go on EASY</a>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question