Created
September 22, 2020 06:09
-
-
Save marchbold/a31b8765768c00b1c691d7cea9ec6ea0 to your computer and use it in GitHub Desktop.
Use InAppBilling to check for updates
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
InAppBilling.service.inAppUpdates.addEventListener( InAppUpdatesEvent.CHECK_APP_UPDATES_SUCCESS, successHandler ); | |
// Perform the updates check | |
InAppBilling.service.inAppUpdates.checkAppUpdate(); | |
function successHandler( event:InAppUpdatesEvent ):void | |
{ | |
if (event.updateAvailability == InAppUpdateAvailablity.UPDATE_AVAILABLE) | |
{ | |
// An update is available | |
trace( "info: " + (event.updateInfo == null ? "null" : event.updateInfo.toString()) ); | |
} | |
else | |
{ | |
// No update available | |
} | |
} | |
// com.distriqt.InAppBilling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment