Windows Push Notification

Integrate Push Notification in Windows with App42

  • Send an event or alert to your App users even when they are not online in App
  • Send push using App42 with Toast notification for Windows Phone.

1. Build and Run

  • Register with App42 platform
  • Go to the dashboard and click on the Create App button
  • Fill all the mandatory fields and get your APIKey and SecretKey
  • Download App42 Windows Phone sample app and unzip it on your machine
  • Open this Sample App in your Microsoft Visual Studio 2010 Express for Windows Phone
  • Edit MainPage.xaml.cs  file and put your APIKey and SecretKey (which were received in step#2 & #3) as shown below and also modify userId variable with your App user name .
ServiceAPI sp = new ServiceAPI("Your APIKey","Your SecretKey");
PushNotificationService pushObj = sp.BuildPushNotificationService();
String userId = "Your User";
  • Build and Run Sample App
  • Go to AppHQ Console , Select Push Notification Tab
  • Select your service and click user tab
  • Check user name to send message
  • Click on send Message and write your message to be sent
  • Click on send button.
windows phone send messages

2. Send Push using App42 Push APIs

Here is a snippet to send message to user from Windows Phone SDK

void SendMessageToUser()
{
string userName = "AppUser";
string title = "Hi";
string subTitle = "Shashank";
string paramsToPass = "TestPage.xaml";
// Send Message to specific User.
pushObj.SendPushToastMessageToUser(userId , title, subTitle, paramsToPass, this);
}
  • Build and Run Sample App
  • Go to AppHQ Console , Select Push Notification Tab
  • Select your service and click user tab
  • Check user name to send message
  • Click on send Message and write your message to be sent
  • Click on send button.
Documentation