I am developing a Phonegap app that plays audio using the Phonegap Media plugin. When I press the home button or screen lock button on my android device (KitKat 4.4), the a
When I was developing an mp3 player for my thesis, I was encountering the same issue in the first android version.
The issue was that I was not creating threads and so the stop function was not prioritary to be executed.
I know that my thesis was not in Cordova, but reading Cordova documentation it states
Threading. JavaScript in the WebView does not run on the UI thread. It runs on the
WebCore thread
from Cordova Documentation
Looking also at Android Documentation, have you thought of implementing a class that handles multiple thread and task queue that fits with Cordova plugin ?