You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
MusicControl.enableControl() makes app keep running even if I completely close it. Normally even if I use BackgroundTimer, the interval will stop after I completely close the app from the Android menu. If I execute MusicControl.enableControl() in componentDidMount, the app keeps running even I close it.
MusicControl.enableControl('play', false); or MusicControl.stopControl(); doesn't help, app keeps still running.
Note: this happens even If I completely remove BackgroundTimer so this is not a BackgroundTimer issue.
Sample code (provide repo url or sample code)
import MusicControl from 'react-native-music-control';
import BackgroundTimer from 'react-native-background-timer';
componentDidMount() {
let i = 0;
BackgroundTimer.setInterval(() => {console.log(i); i++;}, 1000);
MusicControl.enableControl('play', true);
}
componentWillUnmount() {
MusicControl.enableControl('play', false);
MusicControl.stopControl()
}
Platform ?
iOS
Android
Device
Simulator
Real device
The text was updated successfully, but these errors were encountered:
Same here, it causes the playing audio in the app continue to play ever after the app is closed in Android.
Any update on this and way to fix it? Any suggestions appreciated!
Description
MusicControl.enableControl() makes app keep running even if I completely close it. Normally even if I use BackgroundTimer, the interval will stop after I completely close the app from the Android menu. If I execute MusicControl.enableControl() in componentDidMount, the app keeps running even I close it.
MusicControl.enableControl('play', false); or MusicControl.stopControl(); doesn't help, app keeps still running.
Note: this happens even If I completely remove BackgroundTimer so this is not a BackgroundTimer issue.
Platform ?
The text was updated successfully, but these errors were encountered: