Google Licensing (aka LVL) - How to test on my own device?

Hi,

I am following this tutorial by develephant on how to incorporate LVL in order to prevent unauthorized installs of my Google Play app.

However, after entering my custom key into my config.lua file, I get this error on my test Galaxy S3:

Runtime Error:

java.lang.SecurityException:

Neither user 1xxxx nor current

process has com.android.vending.CHECK_LICENSE

I’m assuming this means that LVL works, which is great, but how do I get around this when it’s my own test device? 

Even if the answer is that I have to buy my own app from the Play Store, I’m perfectly fine with that.

I just need to know that’s the answer.

Thanks guys

You don’t need to purchase the app from yourself to test it.

A runtime error means something isn’t set up properly.

As a first step, you need to configure the android permissions for your app (build.settings).

Something like this:

settings { android = { usesPermissions = { "com.android.vending.CHECK\_LICENSE" } } }

It’s been a while since I set up a new Google Play app from scratch, but secondly, you might also need to set up the email address you use as a login-account on your Android device as a test-id in the Google Play (License testing) dashboard. Also I assume an alpha or beta of your APK should be uploaded to Google Play.

Please note that any changes made to the Google Play dashboard are not immediate. It may take several hours to take effect. 

As a rule, I usually make changes at night and only start testing the following day to make sure Google has propagated the updated info.

Thanks ingemar. I will try this out

Even if the answer is that I have to buy my own app from the Play Store, I’m perfectly fine with that.

I just need to know that’s the answer.

Thanks guys

You don’t need to purchase the app from yourself to test it.

A runtime error means something isn’t set up properly.

As a first step, you need to configure the android permissions for your app (build.settings).

Something like this:

settings { android = { usesPermissions = { "com.android.vending.CHECK\_LICENSE" } } }

It’s been a while since I set up a new Google Play app from scratch, but secondly, you might also need to set up the email address you use as a login-account on your Android device as a test-id in the Google Play (License testing) dashboard. Also I assume an alpha or beta of your APK should be uploaded to Google Play.

Please note that any changes made to the Google Play dashboard are not immediate. It may take several hours to take effect. 

As a rule, I usually make changes at night and only start testing the following day to make sure Google has propagated the updated info.

Thanks ingemar. I will try this out