vikeri / react-native-background-job

Schedule background jobs in React Native that run your JavaScript when your app is in the background/killed.
MIT License
747 stars 109 forks source link

Support with create-react-native-app #24

Open DarrylD opened 7 years ago

DarrylD commented 7 years ago

Is there any solution for getting this to work with create-react-native-app or expo?

getting undefined is not an object (evaluating "jobModules.jobs"

Tried using the example code on a fresh CRNA install.

vikeri commented 7 years ago

Supporting crna or expo would be very nice but would require the Java code to be added to the expo/crna codebases. I'm not sure what that procedure looks like and I honestly don't have the time to investigate it. But if someone would research it further that would be awesome. Also I suspect it you'd want to have HeadlessJS for iOS going first so that this library can work on both platforms.

kameswarans commented 6 years ago

Guys please help me! How to call a whole js file (backgroundcheck.js) file run background it only shows Background Job report fired!. Key = regularJobKey . but I do not get any result from backgroundcheck.js

for example i want to run some map function in (backgroundcheck.js). when app goes background i want map continously run but not run. How to implement jobs to the class file and call a funtion.

please help me how to implement it to a js file

vikeri commented 6 years ago

@kameswarans How is this related to the issue above?