PushNotification_dotNET 1.0.0

PushNotification is a framework for Notification .NET applications.
Handle Push Notifications. Across iOS, Android and UWP from a single API.

Install-Package PushNotification_dotNET -Version 1.0.0
dotnet add package PushNotification_dotNET --version 1.0.0
<PackageReference Include="PushNotification_dotNET" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PushNotification_dotNET --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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

static void Main(string[] args)
{
	Notification.Config.YOUR_FCM_SERVER_API_KEY = "AIzSUKAEvGdTGOR1qSbJ1t35";
	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);
}

}

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

static void Main(string[] args)
{
	Notification.Config.YOUR_FCM_SERVER_API_KEY = "AIzSUKAEvGdTGOR1qSbJ1t35";
	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);
}

}

Release Notes

Awesome application PushNotification utility.

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 264 1/17/2019