INNER CODE UNIT · Java

onHostResume

jamesisaac/react-native-background-task · android/src/main/java/com/jamesisaac/rnbackgroundtask/BackgroundTaskModule.java:115

    public void onHostResume() {
        setForeground(true);
        JobManager.instance().cancelAll();
    }

    @Override
    public void onHostPause() {
        setForeground(false);
        commitSchedule();
    }

    @Override
    public void onHostDestroy() {
    }

    /**
     * Keep track of whether the RN app is in the foreground or not (note that even clicking the
     * Android menu button is enough to background the app).

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…