I'm using the nice and simple app update routine of @aeric posted here.
The heart of the routine is this sub:
My question is: Is there a way to know if the user has answered "Install" or "Cancel" to the message that Android automatically generates (asking whether to install the update) when the SendInstallIntent sub finishes?
Thanks
The heart of the routine is this sub:
B4X:
Private Sub SendInstallIntent
Dim i As Intent
If Phone.SdkVersion >= 24 Then
File.Copy(File.DirInternal, mNomeFile_APK, Provider.SharedFolder, mNomeFile_APK)
i.Initialize("android.intent.action.INSTALL_PACKAGE", Provider.GetFileUri(mNomeFile_APK))
i.Flags = Bit.Or(i.Flags, 1) 'FLAG_GRANT_READ_URI_PERMISSION
Else
i.Initialize(i.ACTION_VIEW, "file://" & File.Combine(File.DirInternal, mNomeFile_APK))
i.SetType("application/vnd.android.package-archive")
End If
StartActivity(i)
End Sub
My question is: Is there a way to know if the user has answered "Install" or "Cancel" to the message that Android automatically generates (asking whether to install the update) when the SendInstallIntent sub finishes?
Thanks