3

How can I check if my app is installed by the Google Playstore or just with the apk?

Deepzz
  • 4,573
  • 1
  • 28
  • 52
user3531864
  • 167
  • 3
  • 11

1 Answers1

1

You can use this

Signature[] sighashes = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES).signatures;

The signatures can be compared with your debug keys or release keys(that you used when uploading to Play Store) to check whether its from apk or play store.

However if someone has access to your release key signed apk then I dont know if its possible to distinguish.

Aakash
  • 1,860
  • 19
  • 30
  • 1
    This assumes that the OP signs the APK released on Google Play with a different key than he signs the APK released through other means. This seems highly unlikely. – Code-Apprentice Sep 30 '14 at 05:38