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>
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 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.
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>
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 am working on an email app where I have specified intent-filters on an activity so that other apps can share things from it. Every other apps show my email app intent while sharing but WhatsApp does not show it when I share Email Conversation.
My Actvity is defined in AndroidManifest as shown below:
<activity
android:name="com.test.myapp.ComposeActivity"
android:configChanges="orientation|keyboard|screenSize|screenLayout" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="mailto" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="mailto" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
How can I make my app visible while sharing through WhatsApp?
Figured out it, props to this answer
Turns out that WhatsApp is whitelisting the packages that show up on the chooser. Some whitelisted email clients are outlook, k9 (didn't actually work for me so that may be outdated) and gmail/android email.
One workaround is to have the same application id as one of these whitelisted packages (I've verified this still works) but obviously you won't be able to publish to the app store. If you were desperate you could potentially create another app and bundle the apk into your assets/raw and have them install it from there. This app could share the domain of one of the whitelisted packages and securely transfer this intent to your main app*.
I do not advocate for this approach, just saying it's an option.