'Return True to close, False to cancel
Private Sub B4XPage_CloseRequest As ResumableSub
If WebView1.IsInitialized Then
If WebView1.Url <> "https://mysite.com/content/news" Then
#if B4A
WebView1.Back 'android
#End If
#if B4i
WebView1.GoBack 'iOS
#End If
Return False
End If
End If
B4XPages.ShowPage("AppHome")
Return True
End Sub