I implemented Google License checker by reading the official instructions.
import android.app.Activity;
import android.app.AlertDialog;
import android.conten
Finally I found the proper way of testing of google license checker.
As I uploaded apk in google play developer console as draft and If I install that apk in any device than it will run with response LICENSED if in the device is not having login with test account.
And finally I do testing this way I added test account and i select License Test Response in developer console as LICENSED than app will run and after i also change setting in developer console with NOT_LICENSED than it shows dialog about piracy in the device which having test account as main account.
IMPORTANT NOTE :And other than test account devices it run with the response LICENSED beacuse is I uploaded APK as draft in play store.So for the testing google licensing we must have to consider only test account added in Google Play Developer Console
You already done all these steps but clearly check it once again:
The LVL is working on all devices with the accounts You added, not only the main account. It should not work on phones with an account You don´t added to the developer console. Even, the LVL tries to verify Your app with the google LVL -Server, so You need an internet connection, this is ok. If You just want to check the license once, You have to save some data for example in the shared preferences, that the check has already done. So, the next time the app starts, you could check with these saved shared preferences, if the app is just verified. If yes, do no check again, if no, try it again.
You can set the behavior of checking license in the developer console, You can simulate a normal response, or for example a "not verified" response and so on....