jamesisaac / react-native-background-task

Periodic background tasks for React Native apps, cross-platform (iOS and Android), which run even when the app is closed.
MIT License
1.11k stars 110 forks source link

Why schedule tasks rather than emit for timeout? #42

Open mun3 opened 6 years ago

mun3 commented 6 years ago

Just curious: How come tasks are scheduled on top of Headless JS (and Background Fetch for iOS) rather than emit and listen for events (using RCTDeviceEventEmitter and NativeEventEmitter)? Wouldn't this require no additional dependency and bypass Android scheduling restrictions as well?