Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid how to create Custom URL scheme with the given format myapp://http://
    text
    copied!<p>I have researched through most of the custom URL scheme Q&amp;A and I have not found my possible answer. </p> <p>I want my app to be launched by clicking a certain URL in the browser (any on the mobile device) , the thing is that my given URL cannot be modified as it serves IOS app as well and it looks like this: </p> <p>"myapp://<a href="http://www.name.com/path/path2/">http://www.name.com/path/path2/</a>" </p> <p>I'm not sure how to handle "myapp://http://" and construct a proper intent filter , and everything i tried does not work. Any help will be appreciated , and if I missed a relevant answer please except my apology. </p> <p>This is what I tried so far :</p> <pre class="lang-xml prettyprint-override"><code> &lt;activity android:name="com.myapp.test.SplashScreen" android:exported="true" android:label="@string/app_name" android:screenOrientation="portrait" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;!-- Test for URL scheme --&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.VIEW" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;category android:name="android.intent.category.BROWSABLE" /&gt; &lt;data android:host="www.name.com" android:path="/path/path2/" android:scheme="http" /&gt; &lt;data android:host="www.name.com" android:path="/path/path2/" android:scheme="https" /&gt; &lt;data android:scheme="myapp" /&gt; &lt;/intent-filter&gt; &lt;!-- End Test for URL scheme --&gt; &lt;/activity&gt; </code></pre> <p><strong>Note:</strong> I have tried with/without the exported:true</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload