Tracking Application Install Referral With APK - android

I have an application using which anyone can share the apk of the app itself. The APK will be generated using PackageManager class like this:
File file = new File(packageManager
.getApplicationInfo(packagename, PackageManager.GET_META_DATA)
.publicSourceDir
)
I need to track (deep link or some other way), who installs the app and who sent the referral? At first, it seemed infeasible to me. Then I came to know that chinese apps like Helo and WeLike actually do so. I gave it a try.
When we share the application from inside of it (have no idea how they generate APK, but the method is probably the same since I have checked they are not getting the APK from remote server and APK size is 40 MB and App Size is 40 MB so they mustn't be storing the APK in the package itself), the person who installs that APK is given the referral prize and relevant information like who referred is shown.
How is this possible? I would like to know any possible way.
In short, how can I track APK installs just with an APK file and no link (but includes generating APK from app ofcourse).

Not sure how Help and WeLike are doing it.
But it seems what you are looking for is Firebase invites, which has been deprecated but firebase dynamic links should have the same functionality (as mentioned in the firebase invite page).

I think most easiest solution to share the APK is by downloading the modified(including the user specific referral tacking code) version of the APK in background, once ready then user can share the version easily without waiting for it.
So you can say, user have the app installed.
user use the app normally, meanwhile you can download the modified APK with
user identifier
Once downloaded, the APK can be shared any number of times with the user
tracking.
Alternatively you can prepare the APK within the App, that may take more effort and complexity.

Related

How can I distribute my Android App without deploying on GooglePlay Store [duplicate]

is it possible to create an android application that is meant only for internal use? Basically a private application not meant to be installed by non-approved phones?
If so what is the basic process of deployment? How do you get the app on the employees phone's?
thanks!
The easiest way is to email it to them. Any email with an .apk attachment will get an "Install" button that you can tap to install the app.
Installing from non-market sources needs to be enabled -- which is a bit of a security risk -- but the user will be prompted to turn that on if they need to, and even given a button that will take them right to the appropriate settings page. The whole process is really quite slick. :)
Alternatively, you can copy it to the phone (e.g. after connecting the phone in USB storage mode) and then use a file system app to locate the file and install it.
Emailing it is the easiest way, however.
Edit: I'm assuming you meant private as in "only sent to certain individuals" and you're not actually looking for a method that will prevent the apps from being run on non-approved devices should they end up on one.
There's a proper way to do it now: Google Play Private Channel for Google Apps. You publish app on Private Channel and then send invitations to users. It won't be seen by other users of Google Play.
Option 1
Using Google Play Private Channel is probably the best way, but is useful only for Google Apps users.
Option 2
You can use new Developer dashboard options that let your app be in Alpha or beta phase and is available to only selected google accounts (using groups or google plus circles). Your app can stay in beta indefinitely so not become visible to other users. if you like this method you can also use services like TestFlight.
Option 3
Mail distribution is also ok it's even mentioned in documentation which I find a little bit odd, but I would advise you to use some file storage like Dropbox and just distribute the link to selected people.
Two major ways:
You can either use the non-market application installation method, or adb from a connected PC to install an apk which you distribute as a bare file. The downside is that anyone in possession of the apk can install your application.
Alternatively, you can distribute the application through the android market, but make it require an account on a server you control in order to do anything useful. The upside is that possession of the apk doesn't get an unauthorized user much; the downside is negative ratings from confused randoms, and that you've made your apk very available for interested parties to know about and decompile. (There is or was also a way to put an app on the market but not list it so it was only accessible via a full url, however don't rely on that)
Yes. As of right now I use such a method, I have to manually load the app on the phone, however other techniques can be used. Once loaded the app checks the main server to see if it is up to date. If it is not, it downloads and installs the new version of itself.
If you go to your eclipse workspace and go to yours app's folder, in the bin folder assuming you develop with eclipse, you will find a .apk file somewhere in there. Copy it to the phone and then use something like EZ File Explorer (or something like that) to access your android filesystem, click on the .apk and it will install and be ready to use.

How to prevent such websites like apkpure?

I published many versions so far. And, the users should use the most recent app. However, apkpure shows all the app list that I released.
How come this website take all the apk or abb? I don't want the website takes my applications and block the users in the app. Is there any way to do that?
Actually it's possible to do, using one of the Android features like app bundles. This could help you to verify non Google Play installation. Or even create behavior to crash/exit in such cases.
The whole idea of the approach, it's separation application features to different bundles which could installed be installed within Google play package manager. So you can check it's documentation.
Lots of android users can not access play store when removing the google restrictions, because they want apk file for install. Third party websites publish for that kind users, As well as some desktop users want APk file specially GAME APPs. I think they not Change original APK file.

How can I know if provided source code was used to build APK?

tl;dr: I'm wondering if there's anyway for me to ensure that the source code I (re)viewed on GitHub for an open-source project was actually used to build the APK I'm downloading from Google Play?
Let's say I want to find an app for encrypting files on my local Android device. There are several apps available when googling, many open-source. As I'm going to encrypt sensitive information, I'd like to ensure it's done correctly (and without bad intent), so I review the source code for the app. All looks okay, so I download the app from Google Play and start using it.
If the developer of the app wanted to, they could just offline modify the source code (in a "private build step", so to say), and inject whatever they want (send the unencrypted file content somewhere, fake-encrypt the files, whatever), build the APK and upload that APK to Google Play instead.
Is there anyway to verify the APK actually came from the source code?

How to validate android apk file, how does google validates apk and what are the types of validating android apk??

I am actually planning to automate the process of validating the android apk? can any one suggest me what are the types of validations that google performs before they add the apk to playstore.
If I understand what you're asking correctly, I'm afraid you can't do it. APK validation is ran privately by Google. When you upload an application to the playstore you have to complete a series of forms for your APK, this includes things like: Images such as the Appicon and Banners, the age rating for the application you're uploading and the countries/locales your app is available in.
However I think you're talking about the inter-application processing between uploading and the app being live. This is all handled by google, the java that you write is checked by computers over and over in different circumstances in order to ensure that your code isn't doing anything malicious (not that it could these days).

things to do before exporting app to Android market and how to enable proguard (latest)

What are the things to do for posting an app to the Android market when posting their first app to the market?
Most of it is explained in official docs, I'll add some points from experience:
Create your key store for App signing. Make sure you put some relevant info in your certificate if your App has copyright. keep a backup and guard it in every possible way, play store only accepts apk updates signed with same key as the original one, so does the device when installing an update.
Finalize your package name, make it unique , in future if you lose the signing key, you will have to re-upload app under a different package name.
Make a thorough review of code, watch out for test code, notes, useless comments and unwanted logging traces you might have placed there. Check your TODO items, run a code inspection from your IDE, remove any critical issues if found. Clear useless jar files, and resources. Also consider externalizing hard-coded strings to xml, so that you can add translations later on.
Check and validate manifest file, update version name and version code. Version name is shown when your app is listed in play store. Version code is incremented whenever you upload updated apk to play store. If its a major release you can bump up version name too.
Finally, build your apk in release mode, and optionally run pro-guard. If your app uses plain vanilla android API and no fancy external libraries such as RoboGuice etc, proguard will run fine. Other wise you will have to tell proguard to ignore classes under those packages. Proguard is optional, you can upload app without using it. Some IDE's have a nice GUI to do this.
Sign your apk with the key you created. Install it on test device, do a test run. Additionally, use emulator to test it across android versions. Take some screen shots, maybe a video too.
Prepare publishing material, write down few lines about your app, a list of features and any additional notes. Also, create a 512x512 icon image for your app.
If you have a website about your App, great, else make ready a valid mail id as a developer contact point.
Log in to developer console, upload apk file, fill in relevant screen shots, description, contact details etc etc. Save and publish. It can take anywhere between 2 to even 9-10 hours for your app to be visible in play store listings.
Your app url will be like https://play.google.com/store/apps/details?id=com.example.myapp. Keep an eye on statistics, put keywords along with app name like "muzo - music player" , most people don't know "muzo" they usually search for "music player". Have your app reviewed, links pointing to your app improve its search ranking.
There is an excelent topic in the android documentation talking about how to prepare your app for release. The procedure is the same for your 1st or you 1000st published app.
Please see here: http://developer.android.com/tools/publishing/preparing.html
PS: And a +1 for you, interesting question.

Categories

Resources