-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I check if my app has been installed from the Play Store? #9
Comments
Sounds like you might want to consider using Google Play Licensing? This functionality is available for free through our Google Play Services libs: Alternatively you can use this extension to check the installer package name which should be set to var installer:String = PackageManager.service.getInstallerPackageName();
if (installer == "com.android.vending")
{
// Installed from the play store
} |
Is there a difference between both solutions, in terms of security or reliability? At first sight, the one with PackageManager seems simpler to implement. Additionally, can the script that you suggested block "legit" users inadvertently? What I plan to do is: if the app doesn't come from the Play Store => the user cannot make in app purchases |
That definitely is a reasonable approach and one we have used in the past. I just mentioned the licensing approach as it is a more "official" way of checking the legitimacy of an install. |
Great! Thanks of lot for the advice and for the snippet! |
In the end, some fraudulent APKs still have the "com.android.vending" as installer, so I'm trying to implement the licensing method but it's not working. Here is some feedback:
|
Yeah there isn't an apm package setup for this so you'll need to add the permissions into a project config or manually. You'll need to work through the setup process outlined here as well: https://developer.android.com/google/play/licensing/setting-up |
I'd like to limit the number of fraudulent purchases but I can't use a server validation system for the moment. I've seen on the net some ways to detect if an app has been downloaded from the Play Store or not. Does this ANE helps with that? If yes, is it relevant to block purchases from users that directly installed the APK from other sources, or may I block regular/legit users?
Thanks!
The text was updated successfully, but these errors were encountered: