فهرست منبع

The context is needed to prevent the app from crashing after it was removed from recent list.

Sebastián Katzer 12 سال پیش
والد
کامیت
c38e0143fe
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      src/android/LocalNotificationReceiver.java
  2. 1 1
      src/android/LocalNotificationRestore.java

+ 1 - 1
src/android/LocalNotificationReceiver.java

@@ -47,7 +47,7 @@ public class LocalNotificationReceiver extends BroadcastReceiver {
 
 		try {
 			args    = new JSONObject(bundle.getString(OPTIONS));
-			options = new LocalNotificationOptions(args);
+			options = new LocalNotificationOptions(args, context);
 		} catch (JSONException e) {}
 
 		this.context = context;

+ 1 - 1
src/android/LocalNotificationRestore.java

@@ -48,7 +48,7 @@ public class LocalNotificationRestore extends BroadcastReceiver {
 
 			try {
 				args    = new JSONObject(alarms.getString(alarmId, ""));
-				options = new LocalNotificationOptions(args);
+				options = new LocalNotificationOptions(args, context);
 
 				LocalNotification.add(options);
 			} catch (JSONException e) {}