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.1k stars 111 forks source link

undefined is not an object (evaluating 'RNBackgroundTask.schedule') #44

Open ddthanhdat opened 6 years ago

ddthanhdat commented 6 years ago

How can i fix it?

capture

ahmad-abusaa commented 6 years ago

@ddthanhdat i have the same issue and it gets fixed when i did this part in the documentation

chriscoderdr commented 6 years ago

Did you run react-native link? also did you recompile and reinstall the app in your mobile phone?

victormax94 commented 6 years ago

Hi, im trying to run the example (fetch data in background) and i have the same problem , im using expo for build the app, how can i solve this problem?

krishmi commented 4 years ago

Facing same issue ,please help.

ramemandi commented 4 years ago

facing same issue, any solution ??

Danielgb23 commented 4 years ago

One manual step is still needed - in your project file android/app/src/main/java/myapp/MainApplication.java, add the following to the end of the onCreate() method: BackgroundTaskPackage.useContext(this);

How do I execute this step in an expo project?

JuanPinoC commented 4 years ago

One manual step is still needed - in your project file android/app/src/main/java/myapp/MainApplication.java, add the following to the end of the onCreate() method: BackgroundTaskPackage.useContext(this);

How do I execute this step in an expo project?

Run expo eject to generate android folder, sadly it didnt solve the issue for me.

Danielgb23 commented 4 years ago

One manual step is still needed - in your project file android/app/src/main/java/myapp/MainApplication.java, add the following to the end of the onCreate() method: BackgroundTaskPackage.useContext(this);

How do I execute this step in an expo project?

Run expo eject to generate android folder, sadly it didnt solve the issue for me.

For me neither

terrynguyen255 commented 3 years ago

Anyone know how to fix this?

AugustodeAraujo commented 3 years ago

Any ideas?

Ravi828rk commented 2 years ago

any idea?