Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
Private rp As RuntimePermissions
Dim sf As StringFunctions
CheckUpdate
…… more program rules
End Sub
Private Sub CheckUpdate
InAppUpdate.initialize(False)
InAppUpdate.GetAppUpdateInfo
End Sub
Private Sub InAppUpdate_onAppUpdateInfoReceived(success As Boolean, inAppUpdateInfo As InAppUpdateInfo)
Log(" in inappupdate")
If IsPaused(Me) Then Return
Log(" not paused")
If success Then
If inAppUpdateInfo.updateAvailability = inAppUpdateInfo.UPDATE_AVAILABILITY_DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS Or inAppUpdateInfo.updateAvailability = inAppUpdateInfo.UPDATE_AVAILABILITY_AVAILABLE Then
If Application.VersionCode < inAppUpdateInfo.availableVersionCode Then
InAppUpdate.startImmediateUpdateFlow
'InAppUpdate.StartFlexibleUpdateFlow
End If
End If
End If
End Sub