je souhaite créer un logiciel de rappel. C'est à dire que l'utilisateur peut demander à recevoir une notification à un temps donné. Le problème c'est que quand j'envoie la notification et que le logiciel est fermé ou en arrière plan, cette notification ne sera jamais reçu. Mon script qui l'envoie ce trouve ci-dessous.
De plus je souhaite que la notification se répète par exemple tous lundi à 15h ou tous les mois, tous les ans. Pouvez-vous m'aider.
Merci
Cordialement
Code : Tout sélectionner
public void Start(){
var NotificationChannel = new AndroidNotificationChannel()
{
Id = "NotifID",
Name = "ChanelButton",
Importance = Importance.High,
Description = "Generic notifications",
};
AndroidNotificationCenter.RegisterNotificationChannel(NotificationChannel);
}
public void SendNotification(){
var notification = new AndroidNotification();
notification.Title = nameString;
notification.Text = descriptionString;
notification.FireTime = System.DateTime.Now.AddSeconds(FireTime);
//notification.SmallIcon = Icon;
//notification.LargeIcon = Icon;
var identifier = AndroidNotificationCenter.SendNotification(notification, "NotifID");
}