Nokia

Sending Mobile Push notification using C#/.NET (iOS, Android, Windows Phone 8, Windows 8 and Blackberry)

August 9, 2013 .NET, ANDROID, Blackberry, Extensions, iOS, iPhone, KnowledgeBase, Microsoft, Microsoft SDKs, Mobile, Mobile Services, Mobile-Development, Nokia, Third-Party-Libraries and Frameworks, VisualStudio, VS2010, VS2012, Windows, Windows 8 apps development, Windows Phone, Windows Phone 8, Windows Phone 8.0 SDK, Windows Phone Development, Windows Phone SDK, Windows Phone Store, Windows SDK, Windows Store, Windows Store Development 2 comments

This is an update blog to my earlier blog about Sending Apple iOS Push notifications using C#.

With that blog – I  introduced you to  how to send push notification using Open Source library APNSharp, by the developer John Redth.  Redth announced that library is already deprecated.

Redth came up with  with another open source project called as PushSharp:,published under apache software foundation license.

PushSharp is a server-side library for sending Push Notifications to iOS (iPhone/iPad APNS), Android (C2DM and GCM – Google Cloud Message), Windows Phone, Windows 8, Amazon, Blackberry, and (soon) FirefoxOS devices!. Single library serves the purpose of sending push notifications to multiple platforms. Pretty decent isn’t it?

Here is the basic  architecture:

image

Features of PUsHSHARP

  • Supports sending push notifications for many platforms:
    • Apple (APNS – iPhone, iPad, Mountain Lion)
    • Android (GCM/C2DM – Phones/Tablets)
    • Chrome (GCM)
    • Amazon (ADM – Amazon Device Messaging)
    • Windows Phone 7 / 7.5 / 8 (including FlipTile, CycleTile, and IconicTile Templates!)
    • Windows 8
    • Blackberry (BIS and BES via PAP)
    • Firefox OS (Coming soon)
  • Fluent API for constructing Notifications for each platform
  • Auto Scaling of notification channels (more workers/connections are added as demand increases, and scaled down as it decreases)

Implementation using PushSharp is straight forward

Here’s some sample code: shared by Redth

//Create our push services broker
var push = new PushBroker();

//Registering the Apple Service and sending an iOS Notification
var appleCert = File.ReadAllBytes("ApnsSandboxCert.p12"));
push.RegisterAppleService(new ApplePushChannelSettings(appleCert, "pwd"));
push.QueueNotification(new AppleNotification()
                           .ForDeviceToken("DEVICE TOKEN HERE")
                           .WithAlert("Hello World!")
                           .WithBadge(7)
                           .WithSound("sound.caf"));


//Registering the GCM Service and sending an Android Notification
push.RegisterGcmService(new GcmPushChannelSettings("theauthorizationtokenhere"));
//Fluent construction of an Android GCM Notification
//IMPORTANT: For Android you MUST use your own RegistrationId here that gets generated within your Android app itself!
push.QueueNotification(new GcmNotification().ForDeviceRegistrationId("DEVICE REGISTRATION ID HERE")
                      .WithJson("{"alert":"Hello World!","badge":7,"sound":"sound.caf"}"));

You can get the Push Sharp for your .NET projects from below mentioned links:

Binaries from NuGet: https://www.nuget.org/packages/PushSharp 

To install PushSharp, run the following command in the Package Manager Console

PM> Install-Package PushSharp

Source Code from GitHub: https://github.com/Redth/PushSharp

Documentation and Implementation Guides available at wiki page: https://github.com/Redth/PushSharp/wiki 

Quick links to implementation guides

You can read my previous blogs here:

Sending Apple iOS Push notifications using C#

Apple Push Notifications Service API & C#

Windows Phone devices for Testing– available FREE Online- by Nokia Developer program

April 2, 2013 KnowledgeBase, Microsoft, Microsoft SDKs, Mobile-Development, Nokia, Nokia Developer, Windows, Windows Phone, Windows Phone 7.8, Windows Phone 8, Windows Phone 8.0 SDK, Windows Phone Development, Windows Phone SDK No comments

We all are looking for multiple Windows Phone devices to test our applications. Here is the good news, Nokia came up with a solution for all Nokia Developer program members – “Nokia Developer Remote Drive Access(RDA)” program, through which you can remotely allocate and use a Windows Phone devices for testing purposes. Interesting right?.

It is indeed FREE for all Nokia Developer members.

[Image Courtesy: NOKIA]

The Nokia Developer Remote Device Access (RDA) service is available to all Nokia Developer members (if you don’t have an account, you can create an account for free). You can access the service by using their Nokia Developer logins and passwords.

Each user automatically receives a specific amount of device-usage time per day. The current limit is 8 hours/day.

Here is the link to access Remote Device Access(RDA)

image

For more details and how to use visit the MSDN blog:

http://blogs.msdn.com/b/myamama/archive/2013/04/02/free-windows-phone-8-devices-for-testing.aspx

Develop Applications for Windows Phone and win a trip to Barcelona–Presenting to you by Windows Phone Geek & Nokia

December 19, 2012 .NET, .NET Framework, All, Announcements, Community, Microsoft, Mobile-Development, MSDN, Nokia, Windows, Windows Phone, Windows Phone 7, Windows Phone 7.1 SDK, Windows Phone 8, Windows Phone 8.0 SDK, Windows Phone Development, Windows Phone SDK, Windows Phone Store No comments

To celebrate the launch of the Lumia 920 and 820 devices, Windows Phone Geek and Nokia are offering awesome prizes for developers in the Lumia Geek 8 Week Challenge.

http://windowsphonegeek.com/lumia-geek-8-week-challenge/

Developers can win a trip for 2 to MWC in Barcelona, customized Lumias and their very own demo space at MWC in Barcelona.

All developers need to do is submit a new or updated version of their app to the Windows Phone Store.

There are prize categories for overall best app, best use of Lumia technology and for the app that gets the most votes from the Windows Phone Geek community.

This 8 week competition runs from 13th November until the 8th January during which developers can submit their apps on the Windows Phone Geek web site.

Prize Categories

“Ultimate Lumia Geek”

These prizes will be awarded for the best overall apps picked by our judges.

1st prize:

  • Trip for 2 to MWC in Barcelona. Includes: Airfare, Hotel Accommodations, & Event Passes App Demo @ WIPJam @ MWC Customized Nokia Lumia Device & Nokia Gear
  • $300 ad credit on Nokia’s Ad Exchange (NAX)
  • 1 Year Free Subscription to Nokia’s Premium Developer Program (NPDP)

2nd prize:

  • 1 Free Pass for MWC
  • Accommodations @ special “WIP Developer Pad” in Barcelona App Demo @ WIPJam @ MWC Nokia Lumia Device & Gear
  • $200 ad credit on Nokia’s Ad Exchange (NAX)
  • 1 Year Free Subscription to Nokia’s Premium Developer Program (NPDP)

3rd prize:

  • App Demo @ WIPJam @ MWC
  • Nokia Lumia Device & Gear
  • $100 ad credit on Nokia’s Ad Exchange (NAX)
  • 1 Year Free Subscription to Nokia’s Premium Developer Program (NPDP)

“Best Lumia Technology Showcase”

  • This prize will be awarded for the best usage of core Lumia features. (Lumia camera & imaging, NFC, Nokia Maps & Location or Nokia Music APIs) App Demo @ WIPJam @ MWC Customized Nokia Lumia Device & Nokia Gear$200 ad credit on Nokia’s Ad Exchange (NAX)
  • 1 Year Free Subscription to Nokia’s Premium Developer Program (NPDP)

“People’s Choice Awards”

  • Prize for apps with the most votes from the community
  • Nokia Lumia Device & Gear $50 ad credit on Nokia’s Ad Exchange (NAX)
  • 1 Year Free Subscription to Nokia’s Premium Developer Program (NPDP)

 

Go to the Windows Phone Geek web site to find out more!

http://windowsphonegeek.com/lumia-geek-8-week-challenge/