Options fix
clean up and fixes - Heute gefixt - Code Cleanup NotificationScheduleItemViewModel -fixed NotificationScheduleItemViewModel for Windows compat push implementation Push fixes Push benachrichtungen eingebaut - Status bei push - Push auch in background - Toggle für symtome angepasst push system change exporter update Optionen fix - Optionen aufgeteilt auf 3 tabs - Anpassungen haben jetzt Farbslider Optimierung fix
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using Android.Content;
|
||||
|
||||
namespace cfs_tracker.Platforms.Android;
|
||||
|
||||
[BroadcastReceiver(Enabled = true, Exported = false)]
|
||||
public sealed class CfsNotificationReceiver : BroadcastReceiver
|
||||
{
|
||||
public override void OnReceive(Context? context, Intent? intent)
|
||||
{
|
||||
if (context is null || intent is null)
|
||||
return;
|
||||
|
||||
var scheduleId = intent.GetIntExtra(AndroidNotificationScheduler.ExtraScheduleId, 0);
|
||||
var dayOfWeek = (DayOfWeek)intent.GetIntExtra(AndroidNotificationScheduler.ExtraDayOfWeek, (int)DayOfWeek.Monday);
|
||||
var hour = intent.GetIntExtra(AndroidNotificationScheduler.ExtraHour, 9);
|
||||
var minute = intent.GetIntExtra(AndroidNotificationScheduler.ExtraMinute, 0);
|
||||
|
||||
AndroidNotificationScheduler.ShowNotification(
|
||||
context,
|
||||
scheduleId,
|
||||
"Wie geht es dir?",
|
||||
"Tippe, um deinen Status einzutragen.");
|
||||
|
||||
AndroidNotificationScheduler.ScheduleNextAlarm(
|
||||
context,
|
||||
scheduleId,
|
||||
dayOfWeek,
|
||||
hour,
|
||||
minute);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user