Skip to content

Instantly share code, notes, and snippets.

@marchbold
Created August 11, 2020 12:36
Show Gist options
  • Select an option

  • Save marchbold/ec7c6352422f3c7040ae32ae4470b1fc to your computer and use it in GitHub Desktop.

Select an option

Save marchbold/ec7c6352422f3c7040ae32ae4470b1fc to your computer and use it in GitHub Desktop.
Using the Licensing Verification Library in Adobe AIR
var BASE64_PUBLIC_KEY: String = "BASE64_PUBLIC_KEY";
var SALT:Vector.<int> = Vector.<int>( [ 1, 43, -12, -1, 54, 98, -100, -12, 43, 2, -8, -4, 9, 5, -106, -108, -33, 45, -1, 84 ]);
PlayLicensing.service.setup( BASE64_PUBLIC_KEY, SALT );
PlayLicensing.service.addEventListener( PlayLicensingEvent.ALLOW, checkAccessResponseHandler );
PlayLicensing.service.addEventListener( PlayLicensingEvent.DONT_ALLOW, checkAccessResponseHandler );
PlayLicensing.service.addEventListener( PlayLicensingEvent.ERROR, checkAccessResponseHandler );
PlayLicensing.service.checkAccess();
function checkAccessResponseHandler( event:PlayLicensingEvent ):void
{
trace( "checkAccessResponseHandler(): " + event.type );
trace( " reason: " + event.reason );
trace( " errorCode: " + event.errorCode );
}
// com.distriqt.playservices.Licensing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment