branch metrics link on Android app - android

I'm using Branch lib an Android to generate links that I send afterwards via sms. If user has no app installed on the phone, your link correctly transfers to Play Store ( the link in the dashboard ). After installing and running the application it receives all data from the link as expected.
However, if I have the app already installed on the phone, pressing the link does not open the app but redirects me again to Play Store. If I press the "Open" button there, the app receives the information but how about running the application directly from browser? I saw our iOS implementation of the same lib and it works flawlessly - i.e. when I have the app and I press the link it opens the app without sending me to store.
Perhaps I did something wrong in my declaration in the manifest?
Thanks in advance,
Kalin

Chrome requires an intent string that matches what's defined inside your Android Manifest to properly open an application found on your device. If something's off, Chrome wont open the app. If you're using Branch for deeplinks, you need to make sure the following match:
TL;DR, make sure these match on Branch dashboard and Manifest
package name on branch dashboard is the same as your app build's
host="open" on Activity, because Branch formats intent strings as scheme://open
URI scheme registered on Branch is the same that's found in your AndroidManifest.xml
The same Activity has the following property: android.intent.category.BROWSABLE
The longer explanation is that Branch takes the link tied to your account, and constructs an Intent string that looks like the following:
intent:
HOST/URI-path // Optional host
#Intent;
package=[string];
action=[string];
category=[string];
component=[string];
scheme=[string];
end;
When Branch does the redirect, we pull the scheme and package from your account, and assume you have set android:host as open:
intent://open#Intent;scheme=scheme;package=package;end"
And place that inside window.location. If the registered scheme on your dashboard or package don't match, or open isn't specified in the android:host key, then you'll be taken to Chrome.
It's also important to specify the following android.intent.category.BROWSABLE as a category filter. More information on intent strings here.

Related

How to test Deferred Deep Linking with AppsFlyer?

I'm integrating AppsFlyer with Android Native Application. And I want to use Deferred Deep Linking, when user click landing page ads and download the app and upon first app open the user lands directly on the activity I want.
Link docs: https://support.appsflyer.com/hc/en-us/articles/207032096-Deferred-Deep-Linking-Getting-the-Conversion-Data
But I have not found a way to check that my code is running correctly.
Please help me with this problem
What was working for me is:
Add physical device as a test device in AppsFlyer (here's how to do it)
Enable Debug Mode in AppDelegate.swift in didFinishLaunchingWithOptions
AppsFlyerTracker.shared().isDebug = true
Add AppsFlyer methods in your AppDelegate.swift (as per article)
Remove app (or test build) from physical device
Open Deep Link from physical device, you will be redirected to App Store. Don't install app from the App Store!!! (just close it)
Install app via XCode
After it, on a first install it will call onConversionDataReceived method and the rest staff.
You're going to have to implement the onInstallConversionDataLoaded listener:
public interface AppsFlyerConversionListener {
void onInstallConversionDataLoaded(Map<String,String> conversionData);
void onInstallConversionFailure(String errorMessage);
}
This will return a map of all the parameters on the link that you clicked.
The parameter you need to pay attention to is the af_dp parameter.
This parameter should contain the URI scheme of the activity you want to route your users to. Make sure that you have set up this URI scheme properly in the manifest.
To create a tracking link you can use Link Management. It doesn't matter if it's a single platform link or a OneLink, as long as you have the af_dp parameter on the link, that parameter (along with all other parameters on the link) will be part of the response.
If you're still facing issues, feel free to reach out to support#appsflyer.com.

Deferred deeplink with Adjust does not work if app was not installed

I have an Adjust URI with for my app "myapp" for the method "mymethod" which calls 3 parameters: param1, param2, param3
as you can see here:
https://app.adjust.com/123abc?deep_link=myapp%3A%2F%2Fmymethod%3Fparam1%3D3.5516%26param2%3D3.5629%26param3%3D2016-10-16
If my app was already installed, everything works very fine and those 3 parameters are then aleady set on app start into the proper TextEdits already.
If my app was not installed, the Playstore is called, with the invitation to download the app. I have to press in PlayStore Open to start the app then, to start the app. But the 3 parameters were not set on startup?
EDIT: As you can see in the trailer that my deeplink is not online and the scheme has the form:
myapp://mymethod?param1=3.5516&param2=3.5629&param3=2016-10-16
Those parameters are taken over hand handed to this app. That means When I call that URI myapp starts with those paramters already set in the TextEdit's.
BUT when myapp was not installed, PlayStore is opened with myapp ready to be installed. Starting the myapp afterwards does not take over the parameters into that app (as in calling that URI with preinstalled myapp)
Is your deep link path immediately accessible after install? If there is a signup/login process that blocks access to that URI path, this could be why (Adjust docs).
Deferred deep linking is not a core part of the Adjust platform, so flexibility is somewhat limited. If you need a more comprehensive solution, you could check out Branch.io (full disclosure: I'm on the Branch team). The Branch platform gives you significantly more deferred deep linking options, and also integrates with Adjust to synchronize all your data.

Intent deeplink always opens play store after adding Referr to package

I have two types of deeplinks. An install deeplink that should try to open the application if installed and then fallback to opening the play store if the app is not installed. The second deeplink; however, tries to open the app if it is installed, otherwise it opens a web page as a fallback.
The problem is that when I add a referrer parameter to the package, it starts opening the play store even if the application is installed.
Install deeplink:
Intent://mypath/?cc=de&tagset=2#Intent;scheme=myscheme;package=com.mypackage&referrer=myreferrer;
Opening deeplink:
Intent://mypath/?cc=de&tagset=2#Intent;scheme=myscheme;package=com.mypackage;S.browser_fallback_url=my_fallback_web_url;
Android will use everything that is between package: and ; to determine the packagename of the app to launch/install.
In your example, the package will be com.mypackage&referrer=myreferrer which is different from com.mypackage.
You could instead use S.referrer=myreferrer; instead and parse it in your app.
The solution is to use an undocumented extra parameter S.market_referrer=.
Source

Deep linking via Google Search - how it works, and what to put in the manifest?

Background
I need to investigate how to integrate with the new (?) Google search deep linking feature.
The problem
This seems like a relatively new feature that's still not so popular, so I can't find a lot of resources about how it works and how to configure it correctly.
What I've tried
I've read some websites of Google and watched some of its videos:
https://www.youtube.com/watch?v=kYLrK-gD2Yg
https://www.youtube.com/watch?v=UjLJoMWSXts
https://developers.google.com/app-indexing/webmasters/app
https://support.google.com/googleplay/android-developer/answer/6041489
https://developers.google.com/app-indexing/webmasters/appindexingapi
https://developers.google.com/app-indexing/
https://plus.google.com/+AppIndexing/posts
http://googlewebmastercentral.blogspot.co.il/2014/06/android-app-indexing-is-now-open-for.html
from what I understand, I need to register the app, change the data (intent handling) in the manifest for an activity, and change the code of the activity too, but I'm not sure I understand how it all works and what's the best way to configure it.
The questions
Even after that much reading, I would still like to ask some questions about deep linking using Google Search:
First, the basic question, to verify that I know what it's all about: It lets apps to be indexed via the "Google Search" app, but those apps must be installed too. Once the user clicks an item within "Google Search" app, it goes to your app and you get the query. Is this correct? Is there anything more than that?
They wrote that minSdkVersion should be 17 or below (here). How come it's "or below" instead of "or above" ?
For some reason, the query of the examples (like here) are of just simple texts, but the app is shown there. Why is it shown? What in the manifest tells Google-Search that the app can handle this query? The code examples show URLs ...
Is it possible to test the deep linking via Google Search without registering it (here) ? All I've found is how to test it via adb, but I don't understand where in the example (here) is the query that the user enters.
Do the deep linking require an actual website that users can visit via the web browser ? I ask this because there is a step called "Verify website" when registering to the service (here) .
Suppose I want to allow the user to search for a phone number via the app. Should I put "tel:" in the "scheme" (as shown here) part inside the manifest? Or is it something else(or more than that)? Would Google-Search know exactly when to show the app (for example, when the phone number is valid)?
Is it possible to use this feature in case the app isn't installed, so that it would encourage people to download the app, and/or search via a real website?
Even when trying to test it, I've failed. Manifest:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<!--should match to : https://somehost/search/?number=-->
<data android:scheme="https"
android:host="somehost"
android:pathPrefix="/search/?" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
code:
Intent intent = getIntent();
String action = intent.getAction();
Uri data = intent.getData();
Log.d("AppLog", "action:"+action+" data:"+data);
adb command (from here) :
adb shell am start -W
-a android.intent.action.VIEW -d "somehost/search/?050" com.example.user.myappli
cation
Starting: Intent { act=android.intent.action.VIEW dat=somehost/search/?050 pkg=c
om.example.user.myapplication }
Error: Activity not started, unable to resolve Intent { act=android.intent.actio
n.VIEW dat=somehost/search/?050 flg=0x10000000 pkg=com.example.user.myapplicatio
n }
I've even tried the exact sample, but with a different package name, and it still didn't work.
What's wrong here?
Google Search app and google.com in Chrome as well. User needs to be signed-in. If app is installed, clicks will deep link to your app.
If the app is not installed, participating in App Indexing can help drive installs:
http://googlewebmastercentral.blogspot.com/2015/04/drive-app-installs-through-app-indexing.html
Also, an indexed app is considered "mobile-friendly" which is a ranking signal. Look for "finding more mobile friendly search" on the same blog.
If your minSdkVersion is 15, 16, 17 that's okay. If it's 18, then that's not okay.
If your app is indexed by Google, deep links to your app can appear in Google Search results for users that have your app installed. Google learns about your app's supported deep links when you tell Google about these links via website markup, your sitemap, or by connecting your website. Look for "Provide Deep Links" in the app indexing documentation.
In order to see what queries your content could show up for, go to the new Search Console (g.co/searchconsole) and sign in. Then, you need to look at what sort of traffic your website is getting from Google and what impressions and clicks your content is getting for what queries. If your app supports the same links and you've provided these app deep links to Google, then these are the same queries your app deep links should show up for.
For App Indexing, website is required -- need to tell Google mapping from a web URL to an app deep link, either through sitemap, website markup, or by verifying your website. But if you do either a sitemap or markup, you don't need to verify your website. If you're just talking about your app supporting deep linking, a website is not required for that.
You can use whatever scheme you want for your deep links, so I would guess that tel: should work (though haven't tried it myself). However, Google won't automatically know when to show this phone number until you've provided a mapping to your web content. See #3.
Yes. As of April 2015 this is now possible. See link in answer to #1.
Some suggestions:
In the manifest file, make path prefix "/search".
For adb command, try specifying your link as
"https://somehost/search"
If that doesn't work, it's possible you need to enter a website for your host, i.e. you need a domain. If that's not what you want to do, just create a custom scheme for testing purposes, e.g.
<data android:scheme="example"
android:host="gizmos" />

Install / run (not: download) APK file directly from website

I've seen this answer, but -- as it claims -- link starts download of .apk file, while I'm looking for any way to run it, if it is installed, directly from the web.
I found this example and TestFlight's webpage. There's a link Already Installed? Launch the App -- a simple <a> tag with href set to testflightapp://com.testflightapp.androidapp?scheme=http&host=testflightapp.com&path=m/builds.
However, it seems, that this kind of href / protocol is supported only by installed Test Flight application and not available in general in Android system.
Am I right, that my own application -- the one, that I want to run via link from website -- must itself register and handle private protocol, as in this example.
Yes, your app must have an intent-filter that responds to a particular (preferably non-standard) URI.
In the above case, the intent-filter is for testflightapp:// scheme URIs.

Categories

Resources