Skip to content
Snippets Groups Projects
Commit dd3ee4aa authored by Morten Husted's avatar Morten Husted
Browse files

..

parent 742f8255
No related branches found
No related tags found
No related merge requests found
......@@ -102,12 +102,19 @@ namespace BeSafePlus.Platforms.Android.AndroidSensor
var channel = new NotificationChannel(CHANNEL_ID, "BeSAFEAcitivityService", NotificationImportance.Max);
manager?.CreateNotificationChannel(channel);
}
/* make clickable to open mainacitivity */
var intent = new Intent(this, typeof(MainActivity));
intent.SetFlags(ActivityFlags.ClearTop | ActivityFlags.SingleTop);
var openAppIntent = PendingIntent.GetActivity(this, 0, intent, PendingIntentFlags.Immutable);
// https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Builder
return new NotificationCompat.Builder(this, CHANNEL_ID)
.SetContentTitle("BESafe krer i baggrunden")
.SetContentText("Appen mler skridt og aktivitet")
.SetSmallIcon(Microsoft.Maui.Resource.Drawable.abc_ab_share_pack_mtrl_alpha)
.SetOngoing(true)
.SetContentIntent(openAppIntent)
.Build();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment