react-native-background-task icon indicating copy to clipboard operation
react-native-background-task copied to clipboard

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

Open ddthanhdat opened this issue 6 years ago • 11 comments

How can i fix it?

capture

ddthanhdat avatar Jun 17 '18 05:06 ddthanhdat

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

ahmad-abusaa avatar Jun 29 '18 16:06 ahmad-abusaa

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

chriscoderdr avatar Jul 25 '18 14:07 chriscoderdr

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?

victormax94 avatar Aug 09 '18 13:08 victormax94

Facing same issue ,please help.

krishmi avatar Sep 08 '19 13:09 krishmi

facing same issue, any solution ??

ramemandi avatar May 14 '20 11:05 ramemandi

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?

Danielgb23 avatar Jun 25 '20 00:06 Danielgb23

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.

JuanPinoC avatar Jun 30 '20 03:06 JuanPinoC

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

Danielgb23 avatar Jul 09 '20 23:07 Danielgb23

Anyone know how to fix this?

terrynguyen255 avatar Jul 09 '21 09:07 terrynguyen255

Any ideas?

AugustodeAraujo avatar Jul 23 '21 15:07 AugustodeAraujo

any idea?

Ravi828rk avatar Jul 19 '22 06:07 Ravi828rk