T Thommy Member Licensed User Apr 13, 2019 #1 Hello everyone, I have inserted a video of youtube in a web view and I wanted to ask how to stop the video when I click on the back button of the phone without first stopping the video? Code: Copy Sub Activity_KeyPress (KeyCode As Int) As Boolean If KeyCode = KeyCodes.KEYCODE_BACK Then 'torno alla home 'torno alla home StartActivity(Main) WebView1.Visible =False End If End Sub
Hello everyone, I have inserted a video of youtube in a web view and I wanted to ask how to stop the video when I click on the back button of the phone without first stopping the video? Code: Copy Sub Activity_KeyPress (KeyCode As Int) As Boolean If KeyCode = KeyCodes.KEYCODE_BACK Then 'torno alla home 'torno alla home StartActivity(Main) WebView1.Visible =False End If End Sub
Erel B4X founder Staff member Licensed User Longtime User Apr 14, 2019 #2 Try this: https://www.b4x.com/android/forum/threads/webview-instance.98819/#post-622451 Upvote 0