Licensing event calls anomaly

jpvniekerk

Active Member
Licensed User
Longtime User
I am trying to get to grips with the licensing library and are busy testing it through google play developer console.

I use licensing library version 1.10.

I've had "strange" or unexpected things happening. At least they didn't happen the way I anticipated.

In the end I did a series of tests to determine what happens with each of the server responses. I found the following:

SERVER RESPONSE => Event called
LICENSED => lc_allow*
NOT_LICENSED => lc_DontAllow
LICENSED_OLD_KEY => lc_DontAllow
ERROR_NOT_MARKET_MANAGED => lc_DontAllow
ERROR_SERVER_FAILURE => lc_DontAllow
ERROR_CONTACTING_SERVER => lc_DontAllow
ERROR_INVALID_PACKAGE_NAME => lc_Error
ERROR_NON_MATCHING_UID => lc_Error

* after much confusion, I also found out that even during testing it seems that lc_Allow will cache the "allow" status and subsequent changes to the test response all went to lc_Allow. The only way to overcome this was to uninstall and reinstall the package - and don't start with LICENSED!

I would have expected all of the ERROR responses to call lc_Error in order to facilitate different responses to different errors. At least this is what I can gather from the google play developer console and their licensing help. Or is my logic wrong?

I think especially with ERROR_CONTACTING_SERVER (and ERROR_SERVER_FAILURE) it should not call lc_DontAllow directly, because now, if the end user is off-line (for any reason) when the (unknown) grace period has ended, he will not be able to run the program - EVEN IF HE HAS A LEGAL COPY. To me as a developer, that is a deal-breaker - One unhappy customer is not worth the risk.

Am I missing something here?
 

jpvniekerk

Active Member
Licensed User
Longtime User
The app behaves better when tested for real.

It is just a bit scary for me to launch a new paid app before I can test ALL the functionality with.

Maybe I'll just write a crap piece of program and put it on sale, to do more thorough testing with a real app.
 
Upvote 0

jpvniekerk

Active Member
Licensed User
Longtime User
Ok, thanks.

I was not sure if it will pick up the licensing feedback from Google Play if the app is unpublished - couldn't find anything about this in the Google Play documentation - all I could find was that for testing, it does need to be published (or even uploaded if you test it from your registered device (gmail account).

I will give it a try.
 
Upvote 0

jpvniekerk

Active Member
Licensed User
Longtime User
Still not a good option.

According to Google, the license checking for free apps is different than for paid apps. I have to test for paid apps.

But then I can't buy my own app!!!! So still no cigar!

Now I will have to find someone else that will lend me their phone so he can buy my app so I can test it on their phone...

This is just not easy or very user friendly!!!
 
Last edited:
Upvote 0
Top