Messages app do not recognize my deep links schemas - android

I'm implementing a share feature in my app, the user will be able to share a deep link via sms or any other message app.
The issue I'm facing is that the Phone's message app does not recognize the generated deep link as a link.
I have on the manifest file the intent filter with the scheme and host declared. Also I was able test the deep link from a push notification, that means the manifest configuration works. However, I can't tap the message app deep link and open my app.
<activity
android:name=".activities.DailyGiveawayActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden">
<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="${schemeBU}${schemeEnv}"
tools:ignore="AppLinkUrlError" />
<data
android:host="GiveawayRegistration"
tools:ignore="AppLinkUrlError" />
</intent-filter>
</activity>

Solved this issue using the Android App Link API.
https://developer.android.com/studio/write/app-link-indexing.html.
Using the fallowing intent filter my code is working and the OS knows how to handle the generated URL (even when doesn't exist). The OS will prompt a dialog, the user will have to pick an app capable to manage this url (browsers and my app), but that is good for now. Next stage will be eliminate this steep.
<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"
android:host="${schemeBU}${schemeEnv}"
android:pathPattern="/Register" />
</intent-filter>

Related

Android AppLink prompting for app and chrome

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.

Associated Website not redirecting to Android Instant App

I am attempting to open an instant app from a URL by navigating to an associated link that has been tested in Android Studio and deployed to the app store. I've tested the following:
I know the instant app is available because the Google Play page has "Try It" on it, which works effectively.
App Links Assistant process fully configured, up to "Test App Links" which opens the IA and works correctly.
assetlinks.json placed on my server and can be accessed by https://example.com/.well-known/assetlinks.json
Activated the setting in the following URL: https://support.google.com/googleplay/answer/7240211?hl=en
Intent filters are also fully configured as per the instructions:
<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="example.app" />
</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="example.app" />
</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="example.app" />
</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="example.app" />
</intent-filter>
However, when I navigate to my URL, it doesn't redirect to my instant app as expected. Would anybody be able to direct me towards what might be wrong?
I figured out the answer. If I enter the URL directly on a browser, it will not open an instant app, but the corresponding website. If however, I click on the URL from a link in another website or a text message it will open the instant app as expected. Weirdly, I am trying to launch from an NFC tag, which is treated as a URL entered in the browser.
#Jacobo I saw in another post someone mentioning that with Firebase Dynamic Link they fixed even for browser. I didn't test that yet because I'm actually trying to fix one step before. If I don't have the instant app cached or installed, my link is going to the website not to the InstantApp. Once I open the Instant manually or install the full version works fine but the non cached/ installed is not working. On the Google Play I already see the "Try now" button.

Opening an app from a website by using deep link

I want to make a share link of my android app which also has its own website. The share link will open either the app (if its installed) or will redirect to play store if app not installed. But problem is even though the app is installed in my phone, the share link still redirects to play store and not opening the app. What could be the problem. I checked the same feature in PhonePe. When we refer this app, it shows a link and on clicking it it opens app if PhonePe is already installed.
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</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:scheme="http"
android:host="example.com"
android:path="/api/customer-app-redirection/Register" />
</intent-filter>
</activity>

Samsung Messages app won't deep link into my app

I have an app that has the ability to be launched whenever I receive an SMS with a certain format, it works correctly when using the Android stock Messages app but, when testing on a Samsung device using their Messages app and clicking a link, it won't launch my app but instead try and open the link inside the Messages app, current implementation on AndroidManifest.xml
<activity android:name="com.example.SMSInterceptor"
android:configChanges="keyboardHidden|orientation|screenSize">
<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:host="example.com" />
</intent-filter>
</activity>
Anyone know any solution to this? Any help is appreciated.
add to your intent filter auto verify like below:
<intent-filter android:autoVerify="true">

Android app indexing not working when searched from chrome app

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>

Categories

Resources