0

I would like to be able to open my application using link provided in SMS. I created following intent filter but it is not clickable in messaging app.

<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="sampleapp" />
    <data android:host="smsverification" />
</intent-filter>

It does not work until I change scheme to http or https.

Maybe there might be just error in the sent message?

sampleapp://smsverification/data?value=123&code=abc

Jakub Gruber
  • 745
  • 1
  • 11
  • 27
  • try using sampleapp://smsverification uri since you haven't mentioned "/data" as android:pathPrefix in your manifest – Gautam Jun 01 '17 at 08:31
  • That's just a minor issue but I know about it. Main issue is, that link is not clickable until it is http schema – Jakub Gruber Jun 01 '17 at 08:33
  • look at the CommonsWare solution. I think he is talking about the same thing as you are facing https://stackoverflow.com/questions/20193683/android-deep-linking-issue-how-to-use-custom-url-scheme-myapp-some-data – Gautam Jun 01 '17 at 08:41
  • Seems to me like it's not possible to solve it without having `http` scheme – Jakub Gruber Jun 01 '17 at 08:47
  • Will this be of any help ? https://stackoverflow.com/questions/11328387/can-we-pass-a-uri-in-an-sms-message-instead-of-hyperlink-in-android – Sreehari Jun 01 '17 at 09:29
  • No, still no progress. But I'll keep it as an `http`. It is not clickable if I use custom scheme. – Jakub Gruber Jun 01 '17 at 10:40
  • @JakubGruber How did you achieve this without making the browser open the http url mentioned? Have you done something like this to grab the intent? `` – D S Feb 11 '18 at 22:41
  • Yes, it needs to look like URL link – Jakub Gruber Feb 12 '18 at 06:06

0 Answers0