Просмотр исходного кода

Set device as not ready onDestroy

Sebastián Katzer 10 лет назад
Родитель
Сommit
7a3278345d
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      src/android/LocalNotification.java

+ 9 - 0
src/android/LocalNotification.java

@@ -90,6 +90,15 @@ public class LocalNotification extends CordovaPlugin {
         isInBackground = false;
     }
 
+    /**
+     * The final call you receive before your activity is destroyed.
+     */
+    @Override
+    public void onDestroy() {
+        deviceready = false;
+        isInBackground = true;
+    }
+
     /**
      * Executes the request.
      *