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
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 am implementing an android application which checks whether an installed application can show ads or not.
What is the safest way to achieve this?
Thanks in advance.
Get All Applicaitons that are installed.
final PackageManager pm = getPackageManager();
List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);
Check The Appstore using the app id to check if it has ads
Home Page For Apps: https://play.google.com/store/apps?hl=en
App Page: https://play.google.com/store/apps/details?id=com.bandainamcogames.dbzdokkanww&hl=en
just replace the id's value of com.bandainamcogames.dbzdokkanww with the app package from the packages list
then check the page for "Contains Ads"
Refs:
Get All Apps
An ad is an element from the Web. Every element loaded from the web is essentially a HTTP request. You could implement in your application some mechanism to check the HTTP requests generated in real time by other applications and block them.
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
Generally, when user scans the QR code or sends the designated SMS in the hotel, the user should:
- if the app is not already installed, it should be installed with the current location's content
- if the app is installed already (i.e. from a visit to another hotel using our system), it should check and see if the app needs updating, update if needed, and then load the content for the current hotel location.
But I got deeplinking only how to write the cordova(.js) code in js file.
i followd the link:https://dev.branch.io/getting-started/sdk-integration-guide/guide/cordova/
but there is no infromation for how to redirecting to specific hotel.
So please help me from this problem.
Thanks in advance
i had read about this in a article that you will have to re-direct them according to your ui-router. By default it will always open your index file. but if you want the deeplink to work on specific pages you have configure them in your ui-router.This article explains it link
Alex from Branch.io here: what you're trying to do is Deep Link Routing. This is what allows you to embed information about the hotel into the QR code/SMS link, and then after the app is open you can make sure the user sees the correct content. We have a guide about it here
Branch deffered deeplink is worked fine for me by following this link:https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/blob/master/testbed/www/js/index.js
I want to share link to my app(link on play.google) using facebook api. But I have to have it before posting app on market to put it in my code. Are there any other solutions except updating my app right after posting?
use this
https://play.google.com/store/apps/details?id=<your package name>
and you can get package name by this way.
String packageName = getApplicationContext().getPackageName();
currently it will not show any app but after publishing it automatically redirect in your app page.