INNER CODE UNIT · Java
BackgroundTaskModule
jamesisaac/react-native-background-task · android/src/main/java/com/jamesisaac/rnbackgroundtask/BackgroundTaskModule.java:17
public class BackgroundTaskModule extends ReactContextBaseJavaModule
implements LifecycleEventListener {
private static final String TAG = "BackgroundTask";
/**
* Keep track of whether the React Native app is in the foreground (i.e. whether we're able to
* schedule jobs or not).
*/
private boolean mForeground = false;
/**
* While the app is foregrounded, keep track of the latest JobRequest here, ready to
* re-schedule it as soon as app goes into the background.
*/
private JobRequest mJobRequest;
public BackgroundTaskModule(ReactApplicationContext reactContext) {