Open rizwan92 opened 6 years ago
Same issue here. I'm waiting the desired time:
Keep in mind that after the app leaves the foreground, you'll have to wait at least 50% of the desired period (so, default is 7m30s) before the task executes.
But I can't see any task output. I am using log cat adb logcat *:S ReactNative:V ReactNativeJS:V BackgroundTask:V
and writing to an external api.
Update: Just kidding. After wait about 8m the task was executed.
It's not working for me either, this are my logs:
07-25 10:10:41.215 25542 27749 D BackgroundTask: Initializing
07-25 10:10:41.225 25542 25542 D BackgroundTask: Setting foreground true
07-25 10:10:42.638 25542 27748 I ReactNativeJS: Running application "RadioAppConcept" with appParams: {"rootTag":51}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
07-25 10:10:42.796 25542 27748 I ReactNativeJS: TEST
07-25 10:10:42.816 25542 27749 D BackgroundTask: @ReactMethod BackgroundTask.schedule
Works on iOS if I press Debug-> Simulate background fetch. I've read you can't know when it's supposed to run...
Works on iOS if I press Debug-> Simulate background fetch. I've read you can't know when it's supposed to run...
will it work when app is in foreground ?
any solution yet?
Same here. It's not logging anything inside define block What to do?
hello author, we have been trying to using react-native-background-task as our native module in our app. so i started coding like this
it is not logging out in background or foreground