Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Deep Linking issue ! How to use Custom Url scheme myapp://some_data
    primarykey
    data
    text
    <p>i have tried <a href="https://stackoverflow.com/questions/4953002/android-deep-linking-into-an-app">link1</a>, <a href="https://stackoverflow.com/questions/2448213/how-to-implement-my-very-own-uri-schema-on-android/2448531#2448531">link2</a>,<a href="https://stackoverflow.com/questions/525063/android-respond-to-url-in-intent">link3</a>, <a href="https://stackoverflow.com/questions/3469908/make-a-link-in-the-android-browser-start-up-my-app">link4</a>, <a href="https://stackoverflow.com/questions/13042278/launch-android-application-from-a-browser-link?rq=1">link5</a>, <a href="https://stackoverflow.com/questions/2958701/launch-custom-android-application-from-android-browser/2958870#2958870">link6</a></p> <p>Here's everything described about <a href="https://www.sparq.it/web/api/v1/docs/mobile_uris#deep_linking" rel="nofollow noreferrer">DeepLinking</a></p> <p>What i want is the custom uri myapp://some_data, opens the native application installed in the device that requires some_data to initialise the application.</p> <p>There are 2 scenarios in which the custom url can be clicked.</p> <p>1) from within the SMS app, when user taps the link it should automatically open the installed otherwise open the googleplay store where the app is hosted</p> <p>2) from within the body of a email message.</p> <p>I have tried all the above listed links, but none of them works for me. I m having major problem with the scheme part. </p> <p>Here's my AndroidManifest.xml</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; </code></pre> <p></p> <pre><code>&lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" /&gt; &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" &gt; &lt;activity android:name="MainActivity" android:label="@string/app_name" android:exported="true" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.VIEW" /&gt; &lt;category android:name="android.intent.category.BROWSABLE" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;data android:scheme="inderbagga" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; </code></pre> <p></p> <p>and here's the MainActivity.java</p> <pre><code>TextView tvText=(TextView)findViewById(R.id.tvid); if (getIntent().getAction() == Intent.ACTION_VIEW&amp;&amp;getIntent().getScheme().equals("inderbagga")) { Toast.makeText(getApplicationContext(), ""+getIntent().getScheme(), Toast.LENGTH_SHORT).show(); Uri uri = getIntent().getData(); // do stuff with uri tvText.setText(uri.toString()); } else tvText.setText("NULL"); </code></pre> <p>To be more specific, i want to open the native application when u url of type inderbagga://a1b22c333 is clicked, Either from sms application or gmail/yahoomail email message body.</p> <p>in order to achieve the same, i 've used intent filters to set the scheme. and getIntent() to read the data that equals to a1b22c333 in the MainActivity.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

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