mjuzik icon indicating copy to clipboard operation
mjuzik copied to clipboard

Music stops when app is memory swept by Google

Open jasongrishkoff opened this issue 8 years ago • 2 comments

Looks like you're having a similar issue to me -- when Google does a memory sweep to allocate RAM for another foreground app, your app (if in background) is one of the first they close. This stops the music, as well.

Steps to replicate: start playing music with your app. Then open up a bunch of other apps until yours gets memory dumped.

jasongrishkoff avatar Mar 10 '17 09:03 jasongrishkoff

@jasongrishkoff Currently I'm using react-native-audio-toolkit for playback, which hasn't been very reliable in Android, it has several issues. I'm planning to replace that with a better one, hopefully fixing the issue you have reported.

arjunkomath avatar Mar 11 '17 04:03 arjunkomath

I'm not sure you'll have much luck -- I've been using react-native-audio-streamer, which is quite good, but not good enough. The issue still reminds: if the music playback is linked directly to the React Native app (eg, not in a separate service), when the app gets killed as part of a memory sweep the music will also start. I haven't seen a solution to that yet.

jasongrishkoff avatar Mar 12 '17 17:03 jasongrishkoff