Integrate Push Notification In Windows Phone

Windows Push NotificationPush Notification helps you in sending event or alert to your App users even when they are not logged into App. App42 uses MPNS( Microsoft Push Notification Service) to send Push Notification on WP devices. Windows Phone provides three types of notifications

  1. Toast Notification
  2. Live Tile Notification
  3. Raw Notification

App42 currently supports Toast notification for Windows Phone.

 Here are the few easy steps to get stated with App42 Windows Phone Push Notification
Build and Run
1.   Register with App42 platform
2.   Go to the dashboard and click on the Create App button
3.   Fill all the mandatory fields and get your APIKey and SecretKey
4.   Download App42 Windows Phone sample app and unzip it on your machine
5.   Open this Sample App in your Microsoft Visual Studio 2010 Express for Windows Phone
6.   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";

7.   Build and Run Sample App
8.   Go to AppHQ Console , Select Push Notification Tab
9.   Select your service and click user tab
10. Check user name to send message
11. Click on send Message and write your message to be sent
12. Click on send button.

AppHQ Push Integrate Push Notification In Windows Phone

 

You can send message to App user using any App42 SDK (C#/Java/Android/Windows Phone/JS etc). 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);
}

For more details about Windows Phone Push Notification functionality, see our documentation.

If you have any questions or need any further assistance to integrate this in your App, please feel free to write us at forum.shephertz.com

 

 

Some links in the article may not be viewable as you are using an AdBlocker. Please add us to your whitelist to enable the website to function properly.

Related
Comments