android 4.1 device
"react-native": "0.48.1",
"react-native-background-timer": "1.2.0",
const EventEmitter = Platform.select({
ios: () => NativeAppEventEmitter,
android: () => DeviceEventEmitter,
})();
BackgroundTimer.start(5000);
EventEmitter.addListener('backgroundTimer', () => {
// this will be executed every 5 seconds
// even when app is the the background
console.log('toe',ws.readyState); //stoped when wifi tun off
});
running application ,the background timer task run success,
then return the app ,the app run back,timer task run ok in this time,
but the timer task stopped when i change the wifi status ,
so my problem is the timer task stopped when the app run back and change the network status。
android 4.1 device "react-native": "0.48.1", "react-native-background-timer": "1.2.0", const EventEmitter = Platform.select({ ios: () => NativeAppEventEmitter, android: () => DeviceEventEmitter, })(); BackgroundTimer.start(5000); EventEmitter.addListener('backgroundTimer', () => { // this will be executed every 5 seconds // even when app is the the background console.log('toe',ws.readyState); //stoped when wifi tun off }); running application ,the background timer task run success, then return the app ,the app run back,timer task run ok in this time, but the timer task stopped when i change the wifi status , so my problem is the timer task stopped when the app run back and change the network status。