Check if Android app is installed by playstore [duplicate]

霸气de小男生 提交于 2019-12-10 11:31:09

问题


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


回答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.



来源:https://stackoverflow.com/questions/26113429/check-if-android-app-is-installed-by-playstore

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!