I would like to open an app (if its installed) when I click on the link on my webpage. I've implemented App Links according to official docs but the link is opened in Chrome and my app is not offered to handle the link. If I click on the link in Messages app for example, it works correctly. I think that it's some limitation of the Chrome but I cant find anything online about that. If I try to turn off the verification for App links and implement it just like regular deeplinks it does not work either. Do I need to implement Chrome Intent
s?
This is my intent filter
<activity
android:name=".MainActivity"
android:windowSoftInputMode="adjustNothing">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="mydomain.com"
android:pathPattern="/.*/app-microsite"
android:scheme="http" />
<data
android:host="www.mydomain.com"
android:pathPattern="/.*/app-microsite"
android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
</activity>
I'm putting the comment by Simon Marquis, that helped me, here as an answer to that question, so following visitors might see it more easily.
Deep links are not working if you're using relative links on the same domain.
E.g. you have this page: example.com/index.html
This will open in browser
This will open the app
Related
I am trying to implement an AppLink (deeplink) such that when the app-link is triggered it does not bring up the popup asking for my App or Chrome, I want it to just launch my app so I can direct them to the proper place in the app.
I have read various android articles and posts and cannot get the AppLink to work the way I want.
Here is my manifest xml:
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<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" />
</intent-filter>
<intent-filter android:autoVerify="true">
<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"
android:host="www.example.com" />
</intent-filter>
</activity>
I read in the android doc here the following:
A deep link is an intent filter that allows users to directly enter a
specific activity in your Android app. Clicking one of these links
might open a disambiguation dialog, which allows the user to select
one of multiple apps (including yours) that can handle the given URL.
For example, figure 1 shows the disambiguation dialog after the user
clicks a map link, asking whether to open the link in Maps or Chrome.
Android App Links are a special type of deep link that allows your
website URLs to immediately open the corresponding content in your
Android app (without requiring the user to select the app).
I added auto verify to the intent and have the assetlinks.json file but still prompts to choose my app or chrome. I DO NOT want the prompt for chrome... only my app.
So, what am I missing?
Has anyone here got an app link to work that DOES NOT pop up the option for Chrome?
Can anyone point me to a sample app or code or an article that actually works?
Thanks for any assistance with this.
I am using Branch.io to Deeplink from the Salesforce App to my Cordova app. However, when I click the deeplink in the Salesforce app, it just opens my app within a browser inside the Salesforce app instead of actually taking me to my app. It seems like I should be using a <intent-filter/> to make that happen but it doesn't seem to be able to take me out of the originating Salesforce app. Here is what my <intent-filter/> currently is:
<intent-filter android:name="io.branch.sdk.UriScheme">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="myapp" />
</intent-filter>
<intent-filter android:autoVerify="true" android:name="io.branch.sdk.AppLink">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="myapp.app.link" android:scheme="https" />
</intent-filter>
What other intent actions or categories do I need there?
What actually definitively resolved this was going into the AndroidManifest.xml and setting android:launchMode="singleTask" on my main activity.
I know that in the android docs it says singleTask is not recommended. I believe that's because it prevents you from going back but we take over the functionality of the hardware back button so that's not relevant. Also according to this SO answer, it seems like the right thing to do in our context.
You should only need the intent filters listed here:
https://docs.branch.io/pages/apps/android/#configure-app
If it is opening your app within the Salesforce browser, then it may be that Salesforce is preventing users from deep linking out of it.
When I click a link in something like Gmail, how can I have my web browser show up as an option to open said link? And what code would I implement to go about it? Even just a link to the correct documentation would be incredibly helpful.
Thanks!
You are probably missing to declare this <intent-filter> in your 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"/>
</intent-filter>
For your app to be on the list of apps, you need an <intent-filter> that support web browsing. You can look at this link as a reference and determine what you need to add.
I have integrated app indexing for my android app so that whenever user search from mobile google, list of site will be listed out,on clicking my site it will take to my android app instead of webpage. This works fine when i search from google search app, whereas the same is not working when i search my chrome browser app.
Have implemented using this guide http://googlewebmastercentral.blogspot.in/2014/06/android-app-indexing-is-now-open-for.html
This was the intent filter i have used in my 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"
android:host="mysitedomain"/>
</intent-filter>
I have also tried with <category android:name="android.intent.category.APP_BROWSER" />
I have done site verify from developer console.
Do i am missing any configuration settings
Any suggestion would be helpful.
Thanks.
Whenever we need an app to be called by clicking link from chrome browser, definitely that app should include pathPrefix in data tag of intent filter
in my case for app indexing search from chrome browser i need to include this.
<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="mysitedomain"
android:pathPrefix="/" />
</intent-filter>
I have been trying to make an app which opens automatically when a specific url is entered in the browser. To do so I've been using and intent filter within my manifest like so:
<intent-filter>
<data android:scheme="http" android:host="maltapark.com"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
</intent-filter>
This works fine but only in my default web browser. When I use chrome the app doesn't open.
I have also tried using firefox and it only opens my app with some but not all URLs such as abc://test.
Is there a way to get my app to open irrespective of the browser or URL being used please?
You could use the intent scheme, as explained here. The "Android Browser" may or may not support this, and you might have to rely on iframes. What FireFox does is anyone's guess, but personally I don't believe FireFox is a serious contender on the Android platform.
use this 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:host="maltapark.com"
android:path="/"
android:scheme="TESTSCHEME" />
</intent-filter>
and use this in tag a
"intent://maltapark.com/#Intent;scheme=TESTSCHEME;package=com.YOURPACKAGENAME.www;end"
this is worked for me
What are the URL's you are trying to intercept with your app? You mentioned it doesn't work with something like abc://test, which is correct.
Your intent filter is declaring it wants to intercept urls that match http://maltapark.com.
If the url doesn't match that, it won't open.
try putting in the '*' wildcard in the andriod:scheme and maybe andriod:host attribute (if that is what you needed).