https://github.com/frankodoom/firebase.notification
This is a C# library for sending push notification using Google Firebase Service
https://github.com/frankodoom/firebase.notification
cloud-messaging csharp firebase messaging notifications
Last synced: 10 months ago
JSON representation
This is a C# library for sending push notification using Google Firebase Service
- Host: GitHub
- URL: https://github.com/frankodoom/firebase.notification
- Owner: frankodoom
- Created: 2018-06-21T14:44:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T00:51:06.000Z (over 3 years ago)
- Last Synced: 2025-08-21T19:18:09.109Z (10 months ago)
- Topics: cloud-messaging, csharp, firebase, messaging, notifications
- Language: C#
- Homepage:
- Size: 9.01 MB
- Stars: 16
- Watchers: 1
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Firebase.Notification
This is a C# library for sending push notification using Google Firebase Service
### Install package
```c#
PM> Install-Package Firebase.Notification -Version 1.0.0
```
### Send to Single Device
``` c#
static void Main(string[] args)
{
using (var firebase = new Firebase())
{
firebase.ServerKey = "Your Server Key";
var id = "Your Device Id";
firebase.PushNotifyAsync(id,"title","message").Wait();
Console.ReadLine();
}
}
```
### Send to all subscribers
To send push notification to multiple subscribers suplly a `string[]` of all subscribed Device Id's to the Id parameter of the `PushNotifyAsync()` method.
``` c#
static void Main(string[] args)
{
using (var firebase = new Firebase())
{
firebase.ServerKey = "Your Server Key";
string[] id = " an array of Ids";
firebase.PushNotifyAsync(id,"title","message").Wait();
Console.ReadLine();
}
}
```
### Debugging
Trace errors in your output window, all errors from this library will be captured under the category `Firebase.Notification` for easy debugging.
# Licence
```
Copyright 2018 Frank Odoom
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
````