Commit 069c728a authored by scotthooker's avatar scotthooker
Browse files

Initially the app is not inforeground

We can rely on the the other activity functions setting foreground to be true
parent 09570c49
Loading
Loading
Loading
Loading
+20 −1
Changes for src/android/com/plugin/gcm/PushPlugin.java: 20 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ public class PushPlugin extends CordovaPlugin {
	private static String gECB;
	private static String gSenderID;
	private static Bundle gCachedExtras = null;
    private static boolean gForeground = true;
    private static boolean gForeground = false;

	/**
	 * Gets the application context from cordova's main activity.
@@ -123,6 +123,25 @@ public class PushPlugin extends CordovaPlugin {
		}
	}
	
    @Override
    public void onStart(boolean multitasking) {
        super.onStart(multitasking);
        gForeground = true;
    }

    @Override
    public void onRestart(boolean multitasking) {
        super.onRestart(multitasking);
        gForeground = true;
    }

    @Override
    public void onStop(boolean multitasking) {
        super.onStop(multitasking);
        gForeground = false;
    }


    @Override
    public void onPause(boolean multitasking) {
        super.onPause(multitasking);