{"id":13693548,"url":"https://github.com/aritchie/notifications","last_synced_at":"2025-05-02T21:32:18.425Z","repository":{"id":30932787,"uuid":"34490774","full_name":"aritchie/notifications","owner":"aritchie","description":"Local notifications for iOS, Android, \u0026 Windows.  Includes badges, scheduled notifications, sounds, \u0026 context actions","archived":true,"fork":false,"pushed_at":"2021-08-04T21:07:33.000Z","size":14500,"stargazers_count":103,"open_issues_count":8,"forks_count":39,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-07T12:50:57.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aritchie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-24T01:19:31.000Z","updated_at":"2024-12-19T04:08:49.000Z","dependencies_parsed_at":"2022-08-26T12:11:52.741Z","dependency_job_id":null,"html_url":"https://github.com/aritchie/notifications","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aritchie%2Fnotifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aritchie%2Fnotifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aritchie%2Fnotifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aritchie%2Fnotifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aritchie","download_url":"https://codeload.github.com/aritchie/notifications/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252109059,"owners_count":21696184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T17:01:12.327Z","updated_at":"2025-05-02T21:32:15.353Z","avatar_url":"https://github.com/aritchie.png","language":"C#","funding_links":[],"categories":["XPlat APIs"],"sub_categories":[],"readme":"# UPDATE - This library has now moved to the Shiny Framework at https://github.com/shinyorg/shiny\n\n\n\n## ACR Notifications Plugin for Xamarin and Windows\n\nPlugin for Easy Cross Platform notifications\n\n[![NuGet](https://img.shields.io/nuget/v/Acr.Notifications.svg?maxAge=2592000)](https://www.nuget.org/packages/Acr.Notifications/)\n[Change Log - July 28, 2017](changelog.md)\n\n\n## Features\n\n* Local Notifications\n* Scheduled Notifications\n* Sounds\n* Read all Scheduled Notifications\n* Badges\n* Set metadata on each notification for identification\n* Cancel individual or all notifications\n\n\n## Supported OS\n* iOS 6+\n* macOS\n* Android 4+\n* Universal Windows Platform (Win10/UWP)\n* NET Standard 1.0\n\n### Installation\n\nInstall the nuget package in your platform project as well as your netstandard library.\n\n\n### Send a notification\n\n```csharp\nawait CrossNotifications.Current.Send(\"My Title\", \"My message for the notification\");\n```\n\n### Send a scheduled notification:\n\n```csharp\nawait CrossNotifications.Current.Send(\"Happy Birthday\", \"I sent this a long time ago\", when = TimeSpan.FromDays(50));\n```\n\n### Get a list of scheduled notifications\n\n```csharp\nvar list = await CrossNotifications.Current.GetScheduledNotifications();\n```\n\n### Cancel a specific notification\n```csharp\nvar id = await CrossNotifications.Current.Send(\"Hi\", \"This is my scheduled notification\", when = TimeSpan.FromDays(1));\nawait CrossNotifications.Current.Cancel(id);\n```\n\n### Cancel all scheduled notifications and clear badge:\n\n```csharp\nCrossNotifications.Current.CancelAll();\n```\n\n### To set a badge:\n\nSetting badges works on all platforms, though only select flavours of Android.  A 3rd party library is used to accomplish this.\n\n```csharp\nawait CrossNotifications.Current.SetBadge(4);\nawait CrossNotifications.Current.GetBadge();\n// 0 clears badge\n```\n\n\n### Sounds\n\n_In the notification.Sound property - set only the filename without the extension_\n\n#### Android\n* Put the sound in your /Resources/raw/ folder - make sure the file properties is set to _AndroidResource_\n* You can pass the actual full sound path OR just the name... the plugin will figure it out!\n\n#### iOS\n* Put the file in your iOS app bundle\n* The file format must be a .caf file (google this to see how to make one) - ie. afconvert -f caff -d aacl@22050 -c 1 sound.aiff soundFileName.caf \n\n#### UWP\n* Supports aac, flac, m4a, mp3, wav, \u0026 wma file formats\n* For desktop v1511, custom audio will not work.  The plugin will ignore the sound config if it sees this.\n* Read the following article for more info: https://blogs.msdn.microsoft.com/tiles_and_toasts/2016/06/18/quickstart-sending-a-toast-notification-with-custom-audio/\n\n\n### FAQ\n* Why are most methods async now?\n* _iOS requires all UI based commands run on the UI thread.  Notifications are part of UIKit and thus have this requirement.  With all of my plugins, I try to manage the thread marshalling for you_\n\n* Why can't I set a string as an identifier\n* _Android needs an integer for how it sets identifiers_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faritchie%2Fnotifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faritchie%2Fnotifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faritchie%2Fnotifications/lists"}