I want to implement an app invitation, which I can share to users via a link
Hi, you've been invited to so and so. Click here to accept!
http://myapp.com/?foo1=bar1&foo2=bar2
The link itself will redirect to the google play store, but I want to keep the foo1 = bar1, foo2 = bar2. And when the application has been launched, I want to get that data and do something with it.
Is this at all possible?
If there's not, is there another way that I could go about this?
Thanks!
You could use the Google Play referrer API. There is a a library, the Play Install Referrer Library which wraps this in a slightly easier to use interface.
getting data from the download url
`https://play.google.com/store/apps/details?id=com.example.myapp&referrer=utm_content%3Dgroup232`
after first install, get the referrer and its content (eg. get "group232")
Check here for more details
https://developer.android.com/google/play/installreferrer/library
Related
We have couple of Firebase Dynamic links defined in our native Android application. For the first time users coming from a dynamic link and install the application, we would like to understand which dynamic link they're coming from.
My question is in order to do that, is there any way to fake the Play Store install from the dynamic link ? Because for the testing purposes I need to check which data is coming.
Example :
User clicks dynamic link https://myapp.page.link/qr/?id=123456
Redirected to Play Store
Installs the app and clicks Open from Play Store
Is it possible to know which URI does that Open button passes the app ?
In iOS it's easier to test. When user clicks a dynamic link and goes to App Store, you can run the codebase and install the app. And when app opens it still behaves like it's installed from App Store. But from Android side it doesn't work like that.
Hope it was explanative enough. Looking forward for suggestions.
For those who might be struggling about the same problem, here how I solved it.
First of all even though in the Firebase Dynamic Links Documentation it says that links will survive the Play Store installation process, it is not completely true. Like in my case
User clicks dynamic link https://myapp.page.link/qr/?id=123456
Redirected to Play Store
Installs the app and clicks Open from Play
Store
After the steps above when user opens the app, Firebase dynamic links listener will only get the base landing page which you set from Firebase console. So if you have a link link like this https://myapp.page.link/qr/?id=123456 your query params will get lost !
However it's still possible to understand which deeplink path did user click and install the application. Long story short it's the utmParameters. That variable is a Bundle comes with couple of extras and one of them is utm_campaign key. Which includes your deeplink name. See the code below :
Firebase.dynamicLinks
.getDynamicLink(intent)
.addOnSuccessListener(activity) { pendingDynamicLinkData ->
Log.v(
TAG, "pendingDynamicLinkData link : ${pendingDynamicLinkData?.link}" +
"pendingDynamicLinkData utmParameters : ${pendingDynamicLinkData?.utmParameters}"
)
pendingDynamicLinkData?.let {
// Check if it has your desired utm name
if(it.utmParameters.get("utm_campaign") == "Your Dynamic Link Name") {
//Do the job
}
}
}
.addOnFailureListener(this) { e -> Log.v(TAG, "getDynamicLink:onFailure $e") }
After the implementation, you can create an internal release for yourself and test the download flow from the Play Store.
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.
I created Manually Dynamic Link URL as below
https://uatandroidbetaprogram.page.link/?link=https://*******.com?YourDomain%3Dwww%26OrgID%3Dorgtest%26UserWelcomeName%3DJay%26UserAccountName%3Dr*****#*****.com&apn=*********&amv=10&afl=https://play.google.com/apps/testing/******************
1) In above url I use amv=10. my expectation is if old version app install on phone and if I click the above link it should upgrade the app. But it will just open the app
2) What is the use of amv and how to use it?
3) If old app installed on phone and I open google play store and try to update that time also it will open the app not update the app
Please provide me some solution
Thanks in advance.
If you use the debug view (&d=1 on the link) you can see there are a few warnings which may be preventing the behavior:
https://uatandroidbetaprogram.page.link/?link=https://***************.com?YourDomain%3Dwww%26OrgID%3Dorgtest%26UserWelcomeName%3DJay%26UserAccountName%3Dr********&apn=****************&amv=10&afl=https://play.google.com/apps/testing/***************************&d=1
What you describe is the intended usage of amv, so it should work as you're expecting. Make sure it matches the versionCode parameter in your AndroidManifest.
I want to make an app which will pay users money on downloading another apps from within my app, so how can i track that user had downloaded that app or not, and i want to make sure that after user registered in the downloaded app then only he/she is going to get money, so how can i do this.
Some examples of these types of apps are : Ladooo app, TaskBucks App, Pokkt App,
I found following links which helped me somehow but it is not clear :
http://android-developers.blogspot.in/2010/12/analytics-for-android-apps.html
https://developers.google.com/analytics/devguides/collection/android/v4/
you can retrieve the list of installed applications in the following manner
// retrieve the list of installed applications
List<ApplicationInfo> apps = mPm.getInstalledApplications(0);
can get the package name of the app through
String pkg = apps.get(i).packageName;
I know this is not the full answer but i hope this helps
Not Sure About your requirement or not have idea about playstore api but can give simple logic for this, hope it will help.
When any user share or refer the application for download to other user, create one unique id from the serverside(combination with user who refer) in simple word redirect url to playstore with uniqueid and share that link with intent.
When user register you can check or if redirect url for playstore is via your server than you can send money or points when redirect link callback on server.
check this
or you can refer some codes on github:
here or here
So I have a mobile web that would try to open my android app, if it does not exist, it would fall back to google play.
for chrome, i use this intent:
intent://some_data_sent_to_app#Intent;scheme=app_scheme;package=package_name;end
and it works fine,
now I want to send some referrer string to google play for the INSTALL_REFERRER in an app.
I tried the following link, it has no problem of sending data to google play, but it would not try to open the app
intent://some_data_sent_to_app#Intent;scheme=app_scheme;package=package_name&referrer=referrer_string;end
I wonder what is the correct way to open the app and fall back to google play with the referrer data being passed?
Looks like it can be done by passing S.market_referrer=referrer_string
For example
intent://some_data_sent_to_app#Intent;scheme=app_scheme;package=package_name;S.market_referrer=referrer_string;end
I have not tested this, but there are some check-ins in the chromium repo for this, don't know if it is available in the current version of chrome.
https://codereview.chromium.org/2061493002
This is a known issue that I am working with the team to get fixed. Someone in the past suggested that you can use intent://some_data_sent_to_app#Intent;scheme=app_scheme;package=package_name&referrer=referrer_string;end however the logic of this has never worked specifically because the Chrome browser (and Android Browser) look for a package id that is direct copy of the string which is parsed as package_name&referrer=referrer_string.
With the new scheme, you can pass arguments as extras to the App, but you must encode the URI as follow:
Do Whatever
source