Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add package for sending push notifications #166

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

chrisK00
Copy link
Contributor

@chrisK00 chrisK00 commented Jan 4, 2024

usage

        var notification = new Plugin.LocalNotification.NotificationRequest()
        {
            NotificationId = Random.Shared.Next(),
            Title = "Netflix is due in 2 days",
            CategoryType = Plugin.LocalNotification.NotificationCategoryType.Reminder,
        };

        var hasEnabledNotifications = await Plugin.LocalNotification.LocalNotificationCenter.Current.AreNotificationsEnabled();
	if (!hasEnabledNotifications)
	{
	    await LocalNotificationCenter.Current.RequestNotificationPermission();
	}

        Plugin.LocalNotification.LocalNotificationCenter.Current.Show(notification);

@chrisK00 chrisK00 mentioned this pull request Jan 4, 2024
9 tasks
@chrisK00 chrisK00 merged commit 18d2379 into dev Jan 4, 2024
1 check passed
@chrisK00 chrisK00 deleted the feature/notifications-package branch January 4, 2024 11:53
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant