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">
Related
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 am trying to create an instant app version of my game.
My main game has deep link (and/or app link, I really dont know the difference), and I want the instant app to have it also. By accessing http://mygame.mycompany.com/join?code=12345 , if the user has MyApp installed it will be launched and I will read the code parameter. This part is working fine. What I aim is for when the user doesnt have MyApp installed, I want the Instant App to be launched instead.
I followed all the docs I found but I keep getting the same error when I upload it to Google Play. I searched the error message on Google and found 0 hits, so that made me a bit nervous :) I am contacting the Google Play support in the meantime, if I find a solution I will post here.
The error message is:
"You must provide exactly one default URL for your Instant App APKs."
Does anyone know what that means?
I can upload my main app just fine, no error messages. The Instant App is the one that gives me the error message. And the deeplink is working fine in the main app.
My main app AndroidManifest.xml (relevant parts):
<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="mygame.mycompany.com" android:pathPattern="/join" />
</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="mygame" />
</intent-filter>
My instant app AndroidManifest.xml (relevant parts):
<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="mygame.mycompany.com" android:pathPattern="/join" />
<data android:scheme="https"/>
</intent-filter>
Thanks
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.