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

you need to call create() at least once to create the singleton #82

Open mojtabadarzi opened 4 years ago

hadpro24 commented 4 years ago

Add this in your MainApplication.java

import com.jamesisaac.rnbackgroundtask.BackgroundTaskPackage;

And in your onCreate() method add this line

BackgroundTaskPackage.useContext(this);