From 8d7b0e0f50429cd420fa1ea2004708645579d226 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Thu, 18 Dec 2014 13:59:55 +0100 Subject: [PATCH] always show notification, even when in foreground --- app/src/main/java/xdsopl/robot36/MainActivity.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/xdsopl/robot36/MainActivity.java b/app/src/main/java/xdsopl/robot36/MainActivity.java index b6bf88c..b4b3772 100644 --- a/app/src/main/java/xdsopl/robot36/MainActivity.java +++ b/app/src/main/java/xdsopl/robot36/MainActivity.java @@ -104,6 +104,7 @@ public class MainActivity extends Activity { view = (ImageView)findViewById(R.id.image); view.activity = this; manager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE); + showNotification(); } @Override @@ -116,14 +117,12 @@ public class MainActivity extends Activity { @Override protected void onPause() { view.pause(); - showNotification(); super.onPause(); } @Override protected void onResume() { view.resume(); - manager.cancel(notifyID); super.onResume(); }