ANELicenseChecker is a native extension for Android to use the application licensing features of Google Play. It provides preventive measures against illegal distribution of your app, allowing the application to query Google Play at run time to obtain the licensing status for the current user, then allow or disallow further use as appropriate.

Using Google Play licensing service, it’s possible to apply a flexible licensing policy on an application-by-application basis. For example, an application can check the licensing status and then apply custom constraints that allow the user to run it unlicensed for a specific validity period. An application can also restrict use of the application to a specific device, in addition to any other constraints.

The extension works with Google Play and Samsung Apps (Zirconia).

Sample

import com.pozirk.license.android.LicenseChecker;
import com.pozirk.license.android.LicenseCheckerEvent;

// initialization
try
{
	_checker = new LicenseChecker();
	_checker.addEventListener(LicenseCheckerEvent.LICENSED, onLicensed);
	_checker.addEventListener(LicenseCheckerEvent.NOT_LICENSED, onNotLicensed);
	_checker.addEventListener(LicenseCheckerEvent.APPLICATION_ERROR, onAppError);
}
catch(err:Error)
{
}

//checking license
_checker.check("YOUR_LICENSE_KEY_FOR_THE_APPLICATION"); //you can find it in your app's "Services and APIs" at developer's dahsboard

protected function onLicensed(event:LicenseCheckerEvent):void
{
	if(int(event.data) == LicenseCheckerEvent.OK)
		... //everything is ok
}

protected function onNotLicensed(event:LicenseCheckerEvent):void
{
	if(int(event.data) == LicenseCheckerEvent.RETRY)
		... //probably there is no internet connection, read more info in docs
	else
		... //not licensed
}
Air Native Extension, Android . URL.