This plugin allow to check the app licensing status via Google play LVL.
More info: Google Play Application Licensing.
N.B. Android only
You need your app public key to install the plugin:
cordova plugin add https://github.com/nonostante/cordova-plugin-android-licensing.git --variable PUBLIC_KEY=$app_public_key$
The plugin is available on the window.plugins.licensing object.
Allow to check asynchronically the licensing via the google play servers.
The deviceId is a local id you generated for your user/device. Usually, you should generate it on first access and store it somewhere. If your app use user tracking/analytics tools you can pass the same one.
check(deviceId: string, success: Function, fail: Function): voidwindow.plugins.licensing.check(
deviceId, // your unique id for this current user/device
function () { // success callback
},
function (errCode) { // fail callback
}
);| Code | Description |
|---|---|
| -1 | Retry |
| -2 | License not valid |
Apache License 2.0