I need the app to run fully in the background and when I use other apps on my phone. The program transmits video from the camera. When I turn off the screen, I managed to get the program to transmit video, but when I turn on other programs on the phone, the program stops transmitting. Part of the code as I managed to omit in off mode. i use library @ionic-native/background-mode
componentDidMount() {
document.addEventListener('deviceready', () => {
BackgroundMode.setEnabled(true);
BackgroundMode.disableBatteryOptimizations();
BatteryStatus.onChange().subscribe(status => {
this.batteryStatus = status;
this.signalCurrentStatus();
});
},false);
Use plugin Background Mode
Then use it like this: