How to check Android licensing permission of other applications
Asked Answered
B

1

8

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!

Bout answered 2/8, 2010 at 1:23 Comment(0)
F
7

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.

Friederike answered 2/8, 2010 at 7:24 Comment(3)
+1 for noting that somebody could forge the intents if not properly secured and create its own fake upgrade packetsUnexpected
Thanks for that Christopher - appreciated.Bout
+1 Smart idea, even though I am not sure if this is actually doable.Nasturtium

© 2022 - 2024 — McMap. All rights reserved.