Skip to content

Local notification #11

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

});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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