Windows Azure Push Notifications Edwin van Wijk Marco Kuiper #WAZUGPUSH
Push Notifications Uitdagingen Oplossingen Windows Azure Demo Windows Azure Push Notifications 2
Introductie Edwin van Wijk edwinw@infosupport.com IT Architect bij Info Support Architectuur, SOA, EAI, ESB,.NET, WCF, WF, Windows Azure Trekker Windows Azure Focusgroup Windows Azure Push Notifications 3
Introductie Marco Kuiper marcok@infosupport.com Developer bij Info Support.NET, Mobile, Xamarin, HTML5, CSS3, JS Allround mobile & web geek Windows Azure Push Notifications 4
Wat zijn Push Notifications? Windows Azure Push Notifications 5
Wat zijn Push Notifications? Windows Azure Push Notifications 6
Wat zijn Push Notifications? Windows Azure Push Notifications 7
Push Notifications infrastructuur Device 1 4 PNS (APNS / WNS / GCM) 3 Back-end 2 1. Haal DeviceHandle op 2. Registreer DeviceHandle in de backend 3. Stuur bericht met DeviceHandle 4. Stuur push-notification naar device Windows Azure Push Notifications 8
Uitdagingen Platform specifieke API Pub/Sub Routering Interesses koppelen aan device handles Schaalbaarheid Bijhouden device tokens Broadcasts Windows Azure Push Notifications 9
Mogelijke oplossing PushSharp github.com/redth/pushsharp Backend Apple PushSharp library Android Device# Scalability? Windows Windows Azure Push Notifications 10
Oplossingen m.b.v. Azure Mobile Services Push Notifications Servicebus Notification Hubs Windows Azure Push Notifications 11
Mobile Services Push Notifications Windows Azure Push Notifications 12
Servicebus Push Notification Hubs Multiplatform ios & WinRT Pub/Sub Routering Tags Schaalbaar Preview sinds januari 2013 (Android en Windows Phone later) Schatting GA: zomer 2013 Windows Azure Push Notifications 13
Servicebus Push Notification Hubs infrastructuur 1 5 PNS (APNS / WNS / GCM) 1. Haal DeviceHandle op 2. Registreer DeviceHandle in Hub 3. Stuur bericht naar Hub 4. Stuur bericht naar PNS 5. Stuur push-notification naar device 4 2 3 Device Push Notification Hub Back-end Windows Azure Push Notifications 14
Beheer van registraties Refresh Exists Create 90 dagen geldig Get Update Delete Windows Azure Push Notifications 15
Beheer van registraties Client Push Notification Hub Back-end Push Notification Hub Device Back-end Device Provide PNS Handle Back-end - Alleen update mogelijk als de app draait + Eenvoudige back-end + Update mogelijk als de app niet draait (b.v. meerdere devices en tags) - Veel zelf doen in Back-end Windows Azure Push Notifications 16
Notification formaat Templates Registratie met een template Notification bevat platform onafhankelijke properties CreateTemplateRegistration( ) SendTemplateNotification( ) Native Registratie zonder template Notification bevat body in platform specifiek formaat CreateNativeRegistration( ) SendWindowsNativeNotification( ) SendAppleNativeNotification( ) Windows Azure Push Notifications 17
Templates WNS APNS <toast> <visual> <binding template="toasttext01"> <text id="1">$(msg)</text> </binding> </visual> </toast> { "aps": { "alert": "$(msg)" } } hubclient.sendtemplatenotification( new Dictionary<string, string> { { "msg", "Hello world" } }, null, null ); Windows Azure Push Notifications 18
Pub/Sub routering m.b.v. Tags Sport, Economie Device 1 a c b b Push Notification Hub Sport Technologie a b c Back-end Device 2 Technologie PNS niveau is verdwenen uit het plaatje Windows Azure Push Notifications 19
Boodschappenlijst Windows Store App Windows Store Development Account Service Bus.NET Preview SDK NuGet 0.1.5.0 (07-05-2013) Service Bus WinRT Managed SDK Windows Azure Push Notifications 20
Windows Store App registreren Windows Azure Push Notifications 21
Windows Store App : toasts activeren Package.appxmanifest Windows Azure Push Notifications 22
Security : Shared Access Keys (SAS) Listen Send Manage Windows Azure Push Notifications 23
Boodschappenlijst ios App Apple Developer Account Service Bus.NET Preview SDK Service Bus ios SDK Windows Azure Push Notifications 24
ios App registreren.pfx Windows Azure Push Notifications 25
ios app bouwen Download ios WindowsAzureMessaging library Native library Objective-C header files App/device registeren in Azure Push Notification Hub Windows Azure Push Notifications 26
ios app bouwen 5. didreceiveremotenotification idevice lib 1. registerforremotenotification 2. didregisterforremotenotificationswithdevicetoken APNS 3. createtemplateregistrationwithname (connectionstring + devicetoken + listenaccesssecret) Azure Push Notification Hub 4. SendTemplateNotification Application back end Windows Azure Push Notifications 27
Demo Windows Azure Push Notifications 28
Objective-C
C#, yeah baby!
Xamarin Bindings Azure Mobile Services Notification Hubs
Bouwen met Xamarin.iOS C# language binding voor WindowsAzureMessaging C# library toevoegen in ios app Bouwen in Xamarin Studio of Visual Studio https://github.com/infosupport/windowsazure.messaging.ios
Demo Windows Azure Push Notifications 34
Monitoring op de portal Windows Azure Push Notifications 35
Vragen? Windows Azure Push Notifications 36
Bedankt voor de aandacht!