Files
cfs-Tracker/Platforms/Android/CfsNotificationReceiver.cs
T
Djagor d11f0e46c0 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
2026-03-27 08:47:44 +01:00

31 lines
1.0 KiB
C#

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