Przeglądaj źródła

Fixes #682 crash while resuming app from notification

Sebastián Katzer 10 lat temu
rodzic
commit
38f58ac227
2 zmienionych plików z 11 dodań i 0 usunięć
  1. 1 0
      CHANGELOG.md
  2. 10 0
      src/android/notification/AbstractClickActivity.java

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ Please also read the [Upgrade Guide](https://github.com/katzer/cordova-plugin-lo
 - New "quarter" intervall for iOS & Android
 - Fixed #732 loop between update and trigger (Android)
 - Fixed #710 crash due to >500 notifications (Android)
+- Fixed #682 crash while resuming app from notification (Android 6)
 - Fixed crashing `get(ID)` if notification doesn't exist
 
 #### Version 0.8.2 (08.11.2015)

+ 10 - 0
src/android/notification/AbstractClickActivity.java

@@ -67,6 +67,16 @@ abstract public class AbstractClickActivity extends Activity {
         }
     }
 
+    /**
+     * Fixes "Unable to resume activity" error.
+     * Theme_NoDisplay: Activities finish themselves before being resumed.
+     */
+    @Override
+    protected void onResume() {
+        super.onResume();
+        finish();
+    }
+
     /**
      * Called when local notification was clicked by the user.
      *