T Tomas Petrus Active Member Licensed User Longtime User Oct 25, 2018 #1 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
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 Oct 25, 2018 #2 Tomas Petrus said: How I should proceed ? Click to expand... 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 said: How I should proceed ? Click to expand... 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.
T Tomas Petrus Active Member Licensed User Longtime User Oct 25, 2018 #3 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
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...
Erel B4X founder Staff member Licensed User Longtime User Oct 25, 2018 #4 The activity is paused when the app moves to the background. As DonManfred wrote you will need to use a service with MediaPlayer or SoundPool. Upvote 0
The activity is paused when the app moves to the background. As DonManfred wrote you will need to use a service with MediaPlayer or SoundPool.