CrossMobile icon indicating copy to clipboard operation
CrossMobile copied to clipboard

Local notification

Open beyons opened this issue 3 years ago • 2 comments

Hello how can i create a local notification

this is my code

UNUserNotificationCenter center = UNUserNotificationCenter.currentNotificationCenter(); UNMutableNotificationContent conten = new UNMutableNotificationContent(); conten.setTitle("Jurassic Park"); conten.setSubtitle("Lunch"); conten.setBody("Its lunch time at the park, please join us for a dinosaur feeding"); conten.setSound(UNNotificationSound.defaultSound()); UNTimeIntervalNotificationTrigger trigg = UNTimeIntervalNotificationTrigger.triggerWithTimeInterval(2.0,false); UNNotificationRequest req = UNNotificationRequest.requestWithIdentifier("ContentIdentifier",conten,trigg);

center.addNotificationRequest(req,nsError -> {

});

beyons avatar Nov 16 '22 14:11 beyons

I suspect that you need a local notification for Android?

If yes, right now local notifications are not supported yet.

Please explain your need and let's see what could be done.

teras avatar Nov 17 '22 20:11 teras

Hello yes i need a local notification for android. for Ios is supported ?

beyons avatar Nov 18 '22 06:11 beyons