INNER CODE UNIT · Java

onHostPause

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

    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).
     */
    private void setForeground(boolean foreground) {
        Log.d(TAG, String.format("Setting foreground %s", foreground));
        mForeground = foreground;
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…