Multiple market handlers cause app not to be found - android

Google suggests the way to link to the Google Play Store is:
market://details?id=<package_name> if you are in an application,
and
http://play.google.com/store/apps/details?id=<package_name> if
you are on a webpage.
When we followed this strategy, we got a toast of "No such app found", even though the Google Play Store had the app we were looking for.
This turned out to be caused by the competition of two market handlers: F-droid (Open source marketplace) and Google Play Store. I found there were multiple by looking at the package manager for the intent resolvers.
I only ever want apps in the Google Play Store to be linked to by my app.
Is there a way to force that app to respond to my market://[...] link?
Other strategies suggest attempting one approach, and if that fails, trying the http://[...] link. (The linked solution failed for me, as no exception was thrown.)
What will go wrong if I always link via the http:// method? I.e., skip the market:// link, and use http:// directly in the app. Will this decision come back to haunt me later?

I'm not linking to open source apps, I'm linking to Google play store ones
No, you are trying to open a Uri with an ACTION_VIEW Intent. In principle, the user is welcome to handle that request with anything they want, just as they can open a PDF with whatever app they want. This is one of the few places in Android where I think that it is justified to try to force the issue and steer the user to a particular app and away from whatever they might normally choose.
I only ever want apps in the Google Play Store to be linked to by my app. Is there a way to force that app to respond to my market://[...] link?
If you are the one calling startActivity() for this Uri, you could wrap the Intent in Intent.createChooser(). This would force the chooser dialog to appear, avoiding the default, if there is more than one activity matching the Intent. This is the safest and most stable approach, as it does not depend on any details of the Play Store itself.
You could call setComponent() on the Intent and provide a ComponentName that theoretically points to the desired activity. That's one Google refactoring away from breaking.
You can try to see if setPackage() will limit Intent resolution to your desired app. Once again, if Google decides to switch to a different package as its entry point to the Play Store, you would have to adapt. And I'm not sure if setPackage() is honored in this scenario.
Other strategies suggest attempting one approach, and if that fails, trying the http://[...] link. (The linked solution failed for me, as no exception was thrown.)
Yes, because your problem isn't that there's no match, but that there are multiple matches, and another choice was made instead of the one that you want.
What will go wrong if I always link via the http:// method? I.e., skip the market:// link, and use http:// directly in the app.
This doesn't really solve your problem, insofar as there are other apps that handle that Intent, like Web browsers.

Related

Play Install Referrer vs Firebase Deeplinking

I want to have referral links to get the referral code with in the application (after installation) to provide credits based on the code for both Android and iOS.
I was able to explore these options:
1. Play Install Referrer API
Where the url would look something like: https://play.google.com/store/apps/details?id=com.example.myapp&referrer=utm_source%3Dstaff-referral%26utm_content%3713491235
Where I can get the content 713491235 using the Play Install Referrer API. However the problem here is this is very specific to Android and cannot work for iOS.
2. Firebase deep linking
Where the url would look something like: https://myapp.page.link/?link=https://mywebapp.com/713491235&apn=com.example.myapp
Where I can get the url https://mywebapp.com/713491235 using the Firebase deeplink api. This seems to solve for Android and iOS, but there isn't much information on how long the deeplink is alive, meaning
What happens if I install the app using deeplink but don't open the app for few days. Will it still be available when I open the app later.
What happens if I click on the link, but do not install then are there. Instead install it later by searching on playstore and installing. Will I still be able to get the link once the app is open?
Is there a way to combine both the Play Install Referrer API and Firebase deeplink? like - https://myapp.page.link/?link=https://mywebapp.com&apn=com.example.myapp&afl=https://play.google.com/store/apps/details?id=com.example.myapp&referrer=utm_source%3Dstaff-referral%26utm_content%3713491235 so that if the app is not installed on Android, we can use the Play Install Referrer API(which looks more reliable).
And I am not able to understand the purpose of Play Install Referrer Links, if they are not converted to universal links, because often we don't know which device the url will be used on. Sharing a link specific to playstore doesn't seem to help. What exactly is the usecase of Play Install Referrer?
Because in case of Play Install Referrer API they were clearly mentioning:
Caution: The install referrer information will be available for 90
days and won't change unless the application is reinstalled. To avoid
unnecessary API calls in your app, you should invoke the API only once
during the first execution after install.
I'll answer your questions one by one - I think Firebase Dynamic Links are the better choice for you, based on your requirements.
I couldn't find anything in the documentation for this, but it seems that the link will expire roughly 1 hour from install time (as said here and here).
Android and iOS integration methods are interestingly different in Firebase - if an new iOS user taps the link, it will copy the Dynamic Links URL to the clipboard and read it when the app is opened, whereas Android calls the intent handler for the URL, which in turn calls a Firebase function that extracts the link.
This means that an iOS link, until a user copies something else, should still work - which effectively means a short lifetime, as you can't rely on your users not copying something else. For Android, though, the intent handler is the link - if a user breaks the flow, it'll no longer work.
From a technical view, you could completely create a double-link - I'm not sure whether that would be needed, though, as I'm not sure on how the Play Install Referrer API works and I assume it will use a similar method with them both being developed by Google.
The main use case of the Play Install Referrer API is to track the effectiveness of ad campaigns on a mobile app - the data received from the API is similar to the UTM parameters at the end of a URL (e.g. utm_campaign, utm_source) that tell the website owner where the user comes from. They can be used in situations where the advert knows what your device OS is - for example, an advert inside another app.

Having a deeplink automatically direct to the Google Play Store or Apple App store depending on the device type

We will be sending, via SMS, a link to some of our clients that links them to the Google Playstore or Appstore to download our app.
If the user already has our app installed, the link prompts a "Open with ABC app?" message when clicked.
We want to use a single link, meaning it should somehow automatically pick up device type. Meaning if the user doesn't have our app installed, it appropriately redirects them to the app or playstore.
Our devs are insisting that using a single link is impossible, just trying to make sure this is really the case as I don't recall a lot of apps sending 2 separate links to download from.
Our devs are insisting that using a single link is impossible
I think your devs are trying to avoid work :P
https://firebase.google.com/docs/dynamic-links

Opening the android app using a deep link

My requirement is, There is an advertisement in an email for a shoe, if I click on that ad, it should open my app directly and take me to corresponding page without asking any available option like web browser, etc.
I tried Deep linking fundamental, But I don't know how to create deep links, from where I can get custom scheme(eg. testlink://test).
for eg. google play scheme is market://details/
Thanks in advance
To enable Google to crawl your app content and allow users to enter your app from search results, you must add intent filters for the relevant activities in your app manifest.
refer https://developer.android.com/training/app-indexing/deep-linking.html
https://developers.google.com/app-indexing/android/app
There are actual several questions at play here:
1 - You need to know how to create a URI scheme(the testlink:// protocol you reference).
2 - You need to make your app do something when the end user clicks on the deep link.
To begin at the beginning, you don't "get" the custom scheme from anywhere, you create a URI scheme as part of setting up your app. There is no real standardization as to what that scheme should be (despite some attempts).
The question of how to do this have been answered elsewhere (How to implement my very own URI scheme on Android and in the android docs).
And I actually just published a blog post with some suggestions on how to optimize that URI scheme (https://blog.branch.io/creating-uri-schemes-for-app-content-discovery).
The second question is easier. Once you have that scheme in place, a user who
(a) clicks on a link that matches your scheme
(b) has your app installed and
(c) doesn't have some other app installed which uses the same scheme and which they've already set as the default for that scheme
will be launched directly into your app to the exact location / experience that you defined when you were setting up your intent filters.
Now if you want your deep links to work for users who don't already have your app installed you'll need to use a deferred/contextual deeplinking service. Obviously I'm inclined towards Branch.io since I work for them, but I work for them because I think they have the best offering.
Regarding your last requirement, that there be no browser pop in between, the browser pop is usually part of the flow because it allows a deep linking service to pass some information to their servers about the user on click so that if the user does not have the app they can be directed to the app store and if they do have the app it can be launched by invoking your URI scheme. If you want to do any sort of matching between click and install for users who do not already have the app or pass any info from the click to the app once it launches it been simply unavoidable until now. Universal links on iOS (new in iOS9) change that. They can be invoked directly without needing to go through the browser and pass data directly into the app being launched, which is a pretty big deal. Google is expected to announce an equivalent for Android in the very near future. The setup is a bit intense, but worth it for the improved user experience.
Good luck!

Google Play referral code from one app to another

I'm looking to link to another app from my own, and have the other app be able to track referrals. I'm not the developer on the linked-to app, so I can only assume they set up their BroadcastReceiver to do this correctly.
However on my end, the flow for a user being linked to another app using an http URL is very poor, with little or no conversion being the likely outcome. I'd sooner just directly link the users to the Google Play app. However, I don't know (and can't find any documentation one way or another) online saying whether or not referrals work the same or at all when using the market:// uri to link the user to the Google Play store.
Normally, you would generate an url like this:
https://play.google.com/store/apps/details?id=com.example&referrer=utm_source%3Dfrommyapp%26utm_medium%3Dandroid%26utm_term%3Dbutton
(from https://developers.google.com/analytics/devguides/collection/android/v2/campaigns#referrals)
I'd like to do something more like this:
market://details?id=com.example&referrer=utm_source%3Dfrommyapp%26utm_medium%3Dandroid%26utm_term%3Dbutton
Has anyone had experience with this?

Can I track what keywords lead users to find my app on Google Play?

I know I can add a referrer parameter to the Google Play URL to track downloads from a specific source, but can I track which keyword searches users used to find my app on Google Play?
Before Google Play, i.e Android Market, I was receiving in the referrer all the relevant information to help me understood how my app was found.
It could have been keywords, tops, similar applications, etc.
It was really, really useful.
Since Google Play, I do not receive anything anymore. The only referrers I get are the one I set manualy when I do some campaigns. I spent a lot of time trying to understand why, but it looks like Google Play just doesn't send this information anymore. Doesn't make sense to me, however.
However, you'll get keywords of how users found your application on Google Play from Google search engine (if they hit "Install on my phone" button).
Referrer example utm_source=google&utm_medium=organic&utm_term=my+keyword
(doesn't work if user is using https Google search)
Not exactly, because your app is found by keywords defined by YOU.
-> If you're selling navigation based app, you may enter "navigation". Therefore it appears under keyword navigation and in that case, the result would be relevant.
If they open something related to app that is related to your app, will you be interested in the first keyword that could have been something totally different?
-> If there's an app with keyword "children", they open it and Google Play then recommends something else with children, they open it. Then, this second app, having also keyword children could have a tag "navigation". Then Google Play could recommend YOUR app. I don't believe that tag "children" would be your concern :-)

Categories

Resources