I'm trying to launch my app from a link in email.
I'm not able to launch my app with a link like this : www.example.com/try/code_like_this_12333dfghjklAsbgfh
but when I try with a code like this : www.example.com/try/
it works.
My manifest is:
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"
android:host="example.com" android:pathPattern="/try/.*" />
If all you care about is the path starting with /try/, I recommend using android:pathPrefix instead.
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="http"
android:host="example.com"
android:pathPrefix="/try/" />
Related
I have following intent filter set up for detecting links to open in our 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:host="share.example.tv"
android:pathPrefix="/"
android:scheme="https" />
<data
android:host="example.tv"
android:pathPrefix="/u"
android:scheme="https" />
</intent-filter>
I want my app to open below 2 links
https://share.example.tv/tv34gh
https://example.tv/u/some-user-name
But my app is showing up for these links as well
https://example.tv/anything/literally-anything
If I separate both of the links in different intent-filters for same activity like below
<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="share.example.tv"
android:pathPrefix="/"
android:scheme="https" />
</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="example.tv"
android:pathPrefix="/u"
android:scheme="https" />
</intent-filter>
This works but I don't know why.
iam trying to open my app from a link
and i succeed in it and i can open it from the link but if iam on facebook app .. its opening it with its webview so i cant open my app by its link from facebook and thats what is in my manifist
<intent-filter>
<data
android:host="example.com"
android:pathPrefix="/users"
android:scheme="http" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
thanks
Try removing this line
<category android:name="android.intent.category.BROWSABLE" />
This may fix the issue:
<data android:pathPattern="/.*" />
So the intent filter looks like:
<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="example.com" />
<data android:scheme="https" />
<data android:pathPattern="/.*" />
</intent-filter>
if you register your intent for http://myexample.com and you click in http://myexample.com/blah it will not work.
I want to make intent-filter which can detect urls like this one:
http://www.example.com/?p=12345
I tried with this code:
<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="http"
android:host="www.example.com"
android:pathPattern="/\\?p=.*"/>
</intent-filter>
But it doesn't work. Can anybody help?
I found answer
<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="www.example.com"
android:pathPattern="/*"
android:scheme="http" />
<data
android:host="www.example.com"
android:pathPattern="/.*/"
android:scheme="http" />
</intent-filter>
Ive made an web browser, when I click on a link from gmail for example then it asks how I want to open that link-what browser I want to use (chrome/firefox etc). How do I make it so it asks if it wants to open it with my browser?
Thanks in advance.
Add the appropriate <intent-filter> elements to your activity, and support them properly.
For example, here are relevant <intent-filter> elements used by the AOSP Browser 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="http" />
<data android:scheme="https" />
<data android:scheme="about" />
<data android:scheme="javascript" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:scheme="inline" />
<data android:mimeType="text/html"/>
<data android:mimeType="text/plain"/>
<data android:mimeType="application/xhtml+xml"/>
<data android:mimeType="application/vnd.wap.xhtml+xml"/>
</intent-filter>
I just can't get visiting YouTube on the browser to launch my app. Must be because of AJAX / redirects. This works for Flickr and other websites for me but not for YouTube.
<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="youtube.com"
android:pathPattern=".*"
android:scheme="http" />
<data
android:host="*.youtube.com"
android:pathPattern=".*"
android:scheme="http" />
</intent-filter>
Is there any way doing this?
The following intent-filter works for me on 4.0+:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSEABLE" />
<data android:scheme="http"
android:host="*.youtube.com"
android:pathPrefix="/watch" />
</intent-filter>