Android Question how to signal leaving an app and visiting website ?


Active Member
Licensed User
Longtime User
Hi , I want to show a message when the user clicks on a website wich is coded with a html file

Html file

<a href=""target="_blank">pictures </a>

B4a Code

Sub WebView1_OverrideUrl(Url As String) As Boolean

Dim linkpart1,linkpart2,linkpart3,linkpart4  As String                            

 'This SUB will grab the link the user clicked on and save it in URL
' do something to show mp3 
If Url.EndsWith("mp3") Then
   ' code
   return True 
End If

   '<img src="file:///android_asset/koe.png"/>
   If Url.EndsWith("jpg") Then
      Return True
    End If

Msgbox("This link opens your webbrowser. You will leave the app","")

end sub

The sub grabs the link and looks for jpg and mp3 this works fine
When the flickr link is pressed , the Msgbox = shown but it's
shown twice , also when the user clicks a link on the flickr site
the Msgbox is shown.

Is it possible to show the Msgbox once ,and only when you leave
the app .


Active Member
Licensed User
Longtime User
Oh you're right, the code doesn't leaves the app , but I want to signal to the user
that the content he gets from the opened web-page doesn't belongs to the app.
Upvote 0