Paras Sidhu
Paras Sidhu

Reputation: 680

Tracking Application Install Referral With APK

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).

Upvotes: 2

Views: 586

Answers (2)

Alok
Alok

Reputation: 881

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.

  1. So you can say, user have the app installed.
  2. user use the app normally, meanwhile you can download the modified APK with user identifier
  3. 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.

Upvotes: 1

drulabs
drulabs

Reputation: 3121

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).

Upvotes: 1

Related Questions