1

My application is going to be preinstalled on a vendor device (eg. Vodafone/T-Mobile/ATT is going to sell phones with my app preinstalled). This preinstalled app is very lightweight - only landing page with Update button, which redirects to the Google Play.

I'd like to track how many users coming from this preinstalled app (how many of them sign up, bought subscription, etc.).

Scenario 1:

  • User starts a phone for a first time
  • User opens preinstalled app
  • I can save in shared preferences that user opened app and read it in real updated version

Scenario 2:

  • User starts a phone for a first time
  • Preinstalled app is being updated in background through Play Store
  • I do not recieve any broadcasts (eg. BOOT_COMPLETED) because app was never opened
  • User opens updated version -> I do not know if he's coming from preinstalled app or not

My question is how to solve scenario 2?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
rafakob
  • 3,946
  • 3
  • 26
  • 36

1 Answers1

0

I had that problem too, but didn't find a solution that fit my needs (other than don't update the store version for a few months after releasing the OEM version). You can't save anything if the app wasn't opened, but maybe you can try to read the install date:

long installed = context
.getPackageManager()
.getPackageInfo(context.getPackag‌​eName(), 0)
.firstInstallTime;

(copy&paste from https://stackoverflow.com/a/5311917/2694254, there are also other solutions to get the install date on that site)

You would still have to make some assumptions, like "if app was installed but not opened on the same day" if your App is already publicly released before the OEM App is installed.

tritop
  • 1,655
  • 2
  • 18
  • 30
  • App is already in store. We should probably know on which devices the app is going to be installed. We could make an assumption that if user has installed app after date X & has device Y & is connected to network company Y their version of the app may come from preinstall. – rafakob Oct 22 '18 at 11:47