LVL Library Google Play licensing response code al

2019-05-22 04:00发布

问题:

I've added licensing to my android application using LVL Library. Licensing works properly for normal users which buys it in Google Play (I think so - I don't have any feedback about problems). It worked also when I primarily tested it on second device with some test account.

Currently I have problem that server always return NOT_LICENSED response code (1) on devices with test account whatever I set in "license test answer" in developer console. When I test on device with publisher account answer is correct (server returns what I set in "license test answer").

I've tested on signed release build and on debug build and always the same. I've the same release build uploaded to Google Play (and use the same versionCode for debug version as this which was uploaded). I've tested with single (primary??) test account configured on test device.

Interesting thing - to device with primary test account I've added publisher account (settings/accounts and synch/add account), and answer is still always NOT_LICENSED even if there is publisher account on it. Unfortunatelly I cannot delete test account from that device because I have some data which I don't want to delete.

I gave apk to other testers and added test accounts for them - they have the same issue - always NOT_LICENSED response.

回答1:

i had the same issue for an app that was already published: If you count up your android:versionCode in the Manifest, higher than the currently published version, the play store will always return not_licensed. So the solution is to NOT count up the version code while you are testing. The behaviour is strange but this solution worked for me.