Android Question WebView Stop Activity_Pause Event

hasexxl1988

Active Member
Licensed User
Longtime User
Hello,
does anyone know how I can set the activity so that a playback that runs on a WebView in the Activity also continues when I go out of the App?

I tried the following code:

B4X:
Sub Activity_Resume
    WebView1.LoadUrl(WebView1.Url)
End Sub

Sub Activity_Pause (UserClosed As Boolean)
    WebView1.LoadUrl(WebView1.Url)
End Sub
 

hasexxl1988

Active Member
Licensed User
Longtime User
I did not mean running the Webview in a service. Obviously he wants the user to continue to listen to something while his app is paused. The service might be able to play that mp3, stream o.a. (?)

Yes Stream (Streamcloud, Youtube and more)

if I lock the Display the music continues, only if I leave the app stops everything directly.
 
Upvote 0

hasexxl1988

Active Member
Licensed User
Longtime User
But NOT in a Webview! And he is asking about a Webview.


Thank you for your prompt reply
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…