Android Question sounds on background

Tomas Petrus

Active Member
Licensed User
Longtime User
I am trying to move my sound alerts from webview to app, in webview the sounds are working even when app is on the background.

But when I move them to the app. and call them with JS interface everything works except the time when the app is on the background

at least on Android 8+ I didnt try older ones yet..

How I should proceed ?
I am using audilib and soundpool everything is fine except bloody background mode.

thanks
 

DonManfred

Expert
Licensed User
Longtime User
How I should proceed ?
1. Do not use Webview
2. Do not use a activity for it. Play the sound from a Service
3. Use Mediaplayer or something in the Service.
 
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
thanks : ))
it seems that whole js interface is not working on background...

is there any other way than rewrite whole app ?

all the logic is in webview...
 
Upvote 0
Top