I need to check before show notification that app in sleep mode. I'm use notification as alarm and it is not necessary to show notification if app active Is it possible to check app sleep or not?
var builder = new Notification.Builder(context)
.SetPriority((int)NotificationPriority.High)
.SetVisibility(NotificationVisibility.Public)
.SetDefaults(NotificationDefaults.Vibrate)
.SetCategory(Notification.CategoryAlarm)
.SetContentIntent(contentIntent)
.SetSmallIcon(Resource.Drawable.icon)
.SetContentTitle(title)
.SetContentText(message)
.SetWhen(Java.Lang.JavaSystem.CurrentTimeMillis())
.SetAutoCancel(true);
var notification = builder.Build();
manager.Notify(0, notification);