Skip to content

Local notification #11

@beyons

Description

@beyons

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 -> {

});

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions