Media stops playing after screen turns off on cordova/phonegap Android app

Viewed 209

I think the app might have been paused or killed when phone sleeps, so I believe music stops after a while when screen off. This works if device is in charging state. I have heard running it as a background/service may fix this but I am not really sure how to proceed specifically on Cordova app. I am using cordova media plugin and music plays after user click on a button that invokes media play api. Please guide..

1 Answers

One solution was to to put the app to background and this seems to fix the issue.

Related