SamKr
5/15/2017 - 3:17 PM

Send Tasker Notification

Send Tasker Notification

using System.Web;

var htmlMsg = HttpUtility.UrlEncode("This is the message."); 
var htmlTitle = HttpUtility.UrlEncode("Title of Message");

var http = new HttpClient();
var url = $"https://autoremotejoaomgcd.appspot.com/sendnotification?key=APA91bFf6W2NXuJ9IhVuBx85p96nveYwUi06b7w7Tsy8SICqGprKkjHMokzpBTZBUpbrgTz95ps3DQOV5lQPJT-cyO5FUFjoc269lnkmJabkS7yFw8tH9adWVH33TOHrgVOT08YanHd-&title={htmlTitle}&text={htmlMsg}";
var response = await http.GetAsync(url);
var result = await response.Content.ReadAsStringAsync();

if (result.Contains("OK"))
{
    MessageBox.Show($"Unable to send notification: {result}");
}