transistor-background-fetch icon indicating copy to clipboard operation
transistor-background-fetch copied to clipboard

Display JobId for custom task scheduling

Open vtoupet opened this issue 2 years ago • 2 comments

This would be nice to add a debug log for custom task JobId when scheduleTask is called.

This way, we could test custom task with the JobScheduler: adb shell cmd jobscheduler run -f ${packageName} ${customTaskJobId}

vtoupet avatar Jan 19 '23 17:01 vtoupet

This will be done.

christocracy avatar Jan 22 '23 15:01 christocracy

Ok, this is merged now. The RN version react-native-background-fetch is published to 4.1.8.

$ adb logcat *:S TSBackgroundFetch
TSBackgroundFetch: - registerTask: com.transistorsoft.customtask (jobId: -359368280) <--- jobId added

Copy jobId above and paste into adb shell command:

$ adb shell cmd jobscheduler run -f your.package.name -359368280

christocracy avatar Jan 23 '23 16:01 christocracy