Skip to content

Nonostante/cordova-plugin-android-licensing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This plugin allow to check the app licensing status via Google play LVL.

More info: Google Play Application Licensing.

N.B. Android only

Installation

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$

Usage

The plugin is available on the window.plugins.licensing object.

Check

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): void

Example

window.plugins.licensing.check(
    deviceId, // your unique id for this current user/device
    function () { // success callback

    },
    function (errCode) { // fail callback

    }
);

Error codes

Code Description
-1 Retry
-2 License not valid

License

Apache License 2.0

About

Android cordova plugin for google play licensing check

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages