浏览代码

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) {}