Loading res/values-de/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,7 @@ <string name="notification_action_completed">erledigt</string> <string name="notification_action_delay_1h">+1 Stunde</string> <string name="notification_action_delay_1d">+1 Tag</string> <string name="notification_action_delay_toast">Fälligkeitsdatum aktualisiert</string> <string name="notification_undo">Rückgänging</string> <!-- Strings for time UI widgets --> Loading res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,7 @@ <string name="notification_action_completed">Completed</string> <string name="notification_action_delay_1h">+1 hour</string> <string name="notification_action_delay_1d">+1 day</string> <string name="notification_action_delay_toast">Due date updated</string> <string name="notification_undo">Undo</string> Loading src/org/dmfs/tasks/notification/NotificationActionIntentService.java +13 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import java.util.ArrayList; import org.dmfs.provider.tasks.TaskContract.Tasks; import org.dmfs.provider.tasks.broadcast.DueAlarmBroadcastHandler; import org.dmfs.provider.tasks.broadcast.StartAlarmBroadcastHandler; import org.dmfs.tasks.R; import org.dmfs.tasks.notification.NotificationActionUtils.NotificationAction; Loading Loading @@ -120,6 +121,7 @@ public class NotificationActionIntentService extends IntentService time.normalize(true); delayTask(taskId, time.toMillis(true), tz); } } } Loading Loading @@ -185,10 +187,17 @@ public class NotificationActionIntentService extends IntentService { if (ACTION_COMPLETE.equals(notificationAction.getActionType())) { Intent intent = new Intent(DueAlarmBroadcastHandler.BROADCAST_DUE_ALARM); // intent.setPackage(getApplicationContext().getPackageName()); intent.putExtra(DueAlarmBroadcastHandler.EXTRA_TASK_DUE_TIME, notificationAction.getWhen()); sendBroadcast(intent); // Due broadcast Intent dueIntent = new Intent(DueAlarmBroadcastHandler.BROADCAST_DUE_ALARM); dueIntent.setPackage(getApplicationContext().getPackageName()); dueIntent.putExtra(DueAlarmBroadcastHandler.EXTRA_TASK_DUE_TIME, notificationAction.getWhen()); sendBroadcast(dueIntent); // Start broadcast Intent startIntent = new Intent(StartAlarmBroadcastHandler.BROADCAST_START_ALARM); startIntent.setPackage(getApplicationContext().getPackageName()); startIntent.putExtra(StartAlarmBroadcastHandler.EXTRA_TASK_START_TIME, notificationAction.getWhen()); sendBroadcast(startIntent); } } Loading src/org/dmfs/tasks/notification/NotificationActionUtils.java +5 −1 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ public class NotificationActionUtils NotificationActionUtils.getNotificationActionPendingIntent(context, completeAction))); mBuilder.setWhen(dueDate); mBuilder.setContentIntent(resultPendingIntent); notificationManager.notify(notificationId, mBuilder.build()); } Loading Loading @@ -153,7 +154,10 @@ public class NotificationActionUtils mBuilder.setWhen(startDate); // add actions mBuilder.addAction(NotificationActionIntentService.getCompleteAction(context, notificationId, taskId)); NotificationAction completeAction = new NotificationAction(NotificationActionIntentService.ACTION_COMPLETE, context.getString(R.string.notification_action_completed), R.string.notification_action_completed, notificationId, taskId, startDate); mBuilder.addAction(NotificationActionIntentService.getCompleteAction(context, NotificationActionUtils.getNotificationActionPendingIntent(context, completeAction))); // Creates an explicit intent for an Activity in your app Intent resultIntent = new Intent(Intent.ACTION_VIEW); Loading Loading
res/values-de/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,7 @@ <string name="notification_action_completed">erledigt</string> <string name="notification_action_delay_1h">+1 Stunde</string> <string name="notification_action_delay_1d">+1 Tag</string> <string name="notification_action_delay_toast">Fälligkeitsdatum aktualisiert</string> <string name="notification_undo">Rückgänging</string> <!-- Strings for time UI widgets --> Loading
res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -175,6 +175,7 @@ <string name="notification_action_completed">Completed</string> <string name="notification_action_delay_1h">+1 hour</string> <string name="notification_action_delay_1d">+1 day</string> <string name="notification_action_delay_toast">Due date updated</string> <string name="notification_undo">Undo</string> Loading
src/org/dmfs/tasks/notification/NotificationActionIntentService.java +13 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import java.util.ArrayList; import org.dmfs.provider.tasks.TaskContract.Tasks; import org.dmfs.provider.tasks.broadcast.DueAlarmBroadcastHandler; import org.dmfs.provider.tasks.broadcast.StartAlarmBroadcastHandler; import org.dmfs.tasks.R; import org.dmfs.tasks.notification.NotificationActionUtils.NotificationAction; Loading Loading @@ -120,6 +121,7 @@ public class NotificationActionIntentService extends IntentService time.normalize(true); delayTask(taskId, time.toMillis(true), tz); } } } Loading Loading @@ -185,10 +187,17 @@ public class NotificationActionIntentService extends IntentService { if (ACTION_COMPLETE.equals(notificationAction.getActionType())) { Intent intent = new Intent(DueAlarmBroadcastHandler.BROADCAST_DUE_ALARM); // intent.setPackage(getApplicationContext().getPackageName()); intent.putExtra(DueAlarmBroadcastHandler.EXTRA_TASK_DUE_TIME, notificationAction.getWhen()); sendBroadcast(intent); // Due broadcast Intent dueIntent = new Intent(DueAlarmBroadcastHandler.BROADCAST_DUE_ALARM); dueIntent.setPackage(getApplicationContext().getPackageName()); dueIntent.putExtra(DueAlarmBroadcastHandler.EXTRA_TASK_DUE_TIME, notificationAction.getWhen()); sendBroadcast(dueIntent); // Start broadcast Intent startIntent = new Intent(StartAlarmBroadcastHandler.BROADCAST_START_ALARM); startIntent.setPackage(getApplicationContext().getPackageName()); startIntent.putExtra(StartAlarmBroadcastHandler.EXTRA_TASK_START_TIME, notificationAction.getWhen()); sendBroadcast(startIntent); } } Loading
src/org/dmfs/tasks/notification/NotificationActionUtils.java +5 −1 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ public class NotificationActionUtils NotificationActionUtils.getNotificationActionPendingIntent(context, completeAction))); mBuilder.setWhen(dueDate); mBuilder.setContentIntent(resultPendingIntent); notificationManager.notify(notificationId, mBuilder.build()); } Loading Loading @@ -153,7 +154,10 @@ public class NotificationActionUtils mBuilder.setWhen(startDate); // add actions mBuilder.addAction(NotificationActionIntentService.getCompleteAction(context, notificationId, taskId)); NotificationAction completeAction = new NotificationAction(NotificationActionIntentService.ACTION_COMPLETE, context.getString(R.string.notification_action_completed), R.string.notification_action_completed, notificationId, taskId, startDate); mBuilder.addAction(NotificationActionIntentService.getCompleteAction(context, NotificationActionUtils.getNotificationActionPendingIntent(context, completeAction))); // Creates an explicit intent for an Activity in your app Intent resultIntent = new Intent(Intent.ACTION_VIEW); Loading