Created
August 11, 2020 12:36
-
-
Save marchbold/ec7c6352422f3c7040ae32ae4470b1fc to your computer and use it in GitHub Desktop.
Using the Licensing Verification Library in Adobe AIR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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