Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marchbold/a31b8765768c00b1c691d7cea9ec6ea0 to your computer and use it in GitHub Desktop.
Save marchbold/a31b8765768c00b1c691d7cea9ec6ea0 to your computer and use it in GitHub Desktop.
Use InAppBilling to check for updates
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