Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.
/ SimpleNMA Public archive

Simple Nuget package to send notification to NotifyMyAndroid.

License

Notifications You must be signed in to change notification settings

Nonobis/SimpleNMA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleNMA

Simple Nuget to send notification to NotifyMyAndroid.

Requirements:

.Net Framework 4.0
Account on http://www.notifymyandroid.com

Features:

  • Check API Key is valid
  • Send Notification

Installation:

The easiest way to get started is:

Install-Package SimpleNMA

Sample:

###Check your APIKey

try
{
  NMAManager.Instance.ApiKey = ""; // Set Invalid API
  var bResult = NMAManager.Instance.CheckApiKey();
  if (bResult)
  {
      Console.WriteLine("API OK");
  }
}
catch (Exception ex)
{
  Console.WriteLine(ex.Message);
}

###Send a notification

try
{
    NMAManager.Instance.ApiKey = ""; // Set Valid API
    NMAManager.Instance.ApplicationName = ""; // Set ApplicationName
    var oNotif = new NMANotification("Test", "Test Notification", PriorityNotification.Normal);
    var bResult = NMAManager.Instance.Send(oNotif);
    if (bResult)
    {
        Console.WriteLine("Notification Send with Success");
    }
}
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

About

Simple Nuget package to send notification to NotifyMyAndroid.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages