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.
Related
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/" />
I have tried many solution to open application on click of link in browser but nothing is work for me.
I have already tried like this solution.
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="example.com"
android:pathPrefix="/someresource/"
android:scheme="http" />
<data
android:host="www.example.com"
android:pathPrefix="/someresource/"
android:scheme="http" />
</intent-filter>
Please help me out.
try this its working code.
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<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="qa.mintshowapp.com"
android:pathPrefix="/m/showroom/mintdetaillanding"
android:scheme="http" />
</intent-filter>
</activity>
I m using following code in my menifest to show the option to user when a relevant url is tried to be open by any source inside the mobile, but it is automatically opening web browser instead of showing my application in options.
What could be the issue?
<activity android:name=".VisitWebPage" >
<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:host="www.mysite.com" />
<data android:pathPattern="/.*" />
</intent-filter>
</activity>
Could you try changing your data tags to:
<data android:scheme="http"
android:host="www.mysite.com" />
<data android:scheme="https"
android:host="www.mysite.com" />
You have to use like this, Its working for me.
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<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="mysite.com"
android:pathPrefix="/m/showroom/mypage"
android:scheme="http" />
</intent-filter>
</activity>
I'm programming a download manager application in android .
I create this Intent-Filter in Manifest :
<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="https" />
<data android:scheme="http" />
<data android:scheme="ftp" />
<data android:host="*" />
Google Chrome define my app as a download manager successfully but Mozila Firefox not show my App in Intent dialog by clicking each link.
Please help me to fix this
I found my solution .
Put here for use anyone :
Add this Lines in you manifest :
<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:mimeType="*/*" />
</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>