PushNotification_dotNET 1.2.0

dotnet add package PushNotification_dotNET --version 1.2.0
NuGet\Install-Package PushNotification_dotNET -Version 1.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PushNotification_dotNET" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PushNotification_dotNET --version 1.2.0
#r "nuget: PushNotification_dotNET, 1.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PushNotification_dotNET as a Cake Addin
#addin nuget:?package=PushNotification_dotNET&version=1.2.0

// Install PushNotification_dotNET as a Cake Tool
#tool nuget:?package=PushNotification_dotNET&version=1.2.0

Example: class Program { private static readonly PushNotification Notification = PushNotification.GetPushNotification();

static void Main(string[] args)
{
	Notification.Config.YOUR_FCM_SERVER_API_KEY = "AIzaSyAlGYEvGdTGOR1qSbJ1t35-DJbB7u0FMJ0";
	Notification.Config.YOUR_FCM_SENDER_ID = "";

	SendNotification();

	SendCustomNotification();

	Console.ReadLine();
}

public static void SendNotification()
{
	string fcmDeviceId = "fqVLhCOtiz8:APA91bGEyCjgWkTFCdJVeIldTTAyUF2eu36zf0_rE9cCFlMn7-MiMviGKTcvGfIb0TKmWJKbDdJGbz4Qw3sQv5EG5GduDyM7uoddsTpYXjdYfAOt0Sv7NVLBoBIyB4_nPR0PkrR5LJYB";
	string title = "Test Miky";
	string message = "My Message";

	string sResponseFromServer = Notification.SendNotification(fcmDeviceId, title, message);
	Console.WriteLine(sResponseFromServer);
}

public static void SendCustomNotification()
{
	string fcmDeviceId = "fqVLhCOtiz8:APA91bGEyCjgWkTFCdJVeIldTTAyUF2eu36zf0_rE9cCFlMn7-MiMviGKTcvGfIb0TKmWJKbDdJGbz4Qw3sQv5EG5GduDyM7uoddsTpYXjdYfAOt0Sv7NVLBoBIyB4_nPR0PkrR5LJYB";
	string _title = "Test Miky";
	string _message = "My Message";

	var data = new
	{
		to = fcmDeviceId, // Uncoment this if you want to test for single device
		priority = "high",
		content_available = true,
		notification = new
		{
			title = _title,
			body = _message,
			//icon="myicon"
			badge = 1,
			sound = "default"
		}
	};

	string sResponseFromServer = Notification.SendNotification(fcmDeviceId, data);
	Console.WriteLine(sResponseFromServer);
}

}

Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.0 429 12/21/2022
1.1.0 489 10/27/2021
1.0.0 1,077 1/17/2019

Awesome application PushNotification utility.