I'm playing with CloseRequest which I have placed in B4XMainPage on the ThreePagesExample project. This is an Android 10 device.
In order for this to keep working I seem to have to uninstall the app before re-installing it again. If I don't the app immediately crashes with a "Sub activity_permissionresult was not found" error when it is reinstalled, and when trying to run it subsequently. Uninstalling before reinstalling it again lets it then behave as expected.
B4X:
'Return True to close, False to cancel
Private Sub B4XPage_CloseRequest As ResumableSub
Dim sf As Object = xui.Msgbox2Async("Close?", "Title", "Yes", "Cancel", "No", Null)
Wait For (sf) Msgbox_Result (Result As Int)
If Result = xui.DialogResponse_Positive Then
Return True
End If
Return False
End Sub
In order for this to keep working I seem to have to uninstall the app before re-installing it again. If I don't the app immediately crashes with a "Sub activity_permissionresult was not found" error when it is reinstalled, and when trying to run it subsequently. Uninstalling before reinstalling it again lets it then behave as expected.