ocetnik / react-native-background-timer

Emit event periodically (even when app is in the background)
MIT License
1.6k stars 224 forks source link

stoped when wifi tun off #59

Open zoofei opened 6 years ago

zoofei commented 6 years ago

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。

jussirantala commented 6 years ago

you are not debugging through wifi ?

steve-else commented 6 years ago

Same problem here, timer crashes when you change the wifi while in the background.

autimio-brito-gaivota commented 2 years ago

The same thing has been happening here, have you had a solution?