Commit 83f0732f authored by EddyVerbruggen's avatar EddyVerbruggen
Browse files

[#161] Clear notifications on resume

parent 02e7fce1
Loading
Loading
Loading
Loading
+9 −0
Changes for src/android/com/plugin/gcm/PushHandlerActivity.java: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
package com.plugin.gcm;

import android.app.Activity;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
@@ -60,4 +62,11 @@ public class PushHandlerActivity extends Activity
		startActivity(launchIntent);
	}

  @Override
  protected void onResume() {
    super.onResume();
    final NotificationManager notificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.cancelAll();
  }

}
 No newline at end of file
+0 −1
Changes for src/android/com/plugin/gcm/PushPlugin.java: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -139,7 +139,6 @@ public class PushPlugin extends CordovaPlugin {
    public void onResume(boolean multitasking) {
        super.onResume(multitasking);
        gForeground = true;
        GCMIntentService.cancelNotification(getApplicationContext());
    }

    @Override