I have a free application that has a number of paid-for upgrade applications you can buy for it. The base game is free and remains the application that the user always launches, it detects the presence of the other applications and unlocks various upgrade features as appropriate.
I wanted to use the new licensing service to detect whether the bought applications were licensed, and pass the name of the package to the licensing service to verify if it is authorised (and blindly following the sample I stupidly assumed that passing in the package name to the obfuscator meant that the package name was passed to the licensing server - oops). However I've just realised how dumb that was, and in any case I have hit a brick wall: "If you already published your application as free, you won't be able to upload an updated version that includes licensing (that is, an application that uses the same package name and that includes the licensing permission)".
So, a two-part question: is there any plan to implement what I'm looking for: to check from inside a free application whether any of my other paid published applications are licensed?
If not, then what would be the best way of achieving what I'm seeking? I'm thinking of maybe sending an intent to each of the installed upgrades, getting them to perform the licensing check, and then getting the upgrades to pass the response back into my base application. Sounds a bit messy - any better ideas?
Thanks loads!
checkSelfPermission(activity, Manifest. permission. X) checks if any permission is already granted, if you check out other answers they do the same, and rest of the code asks for the permissions not granted.
Google Play offers a licensing service that lets you enforce licensing policies for applications that you publish on Google Play. With Google Play Licensing, your application can query Google Play at run time to obtain the licensing status for the current user, then allow or disallow further use as appropriate.
So, a two-part question: is there any plan to implement what I'm looking for: to check from inside a free application whether any of my other paid published applications are licensed?
There is no way to do this.
If not, then what would be the best way of achieving what I'm seeking? I'm thinking of maybe sending an intent to each of the installed upgrades, getting them to perform the licensing check, and then getting the upgrades to pass the response back into my base application. Sounds a bit messy - any better ideas?
That sounds like the most reasonable way of doing it, assuming you have no other way of communicating between the clients (e.g. shared storage where you can write the licence status to).
You just probably want to make sure that you secure these methods with custom permissions, so that only your apps can broadcast the licence status to your apps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With