Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Windows Azure Push Notifications

Windows Azure Push Notifications

(Dutch) Session presented with my fellow-architect Edwin van Wijk about the Windows Azure Service Bus Push Notification Hub.

Roy Cornelissen

May 23, 2013
Tweet

More Decks by Roy Cornelissen

Other Decks in Technology

Transcript

  1. Introductie Windows Azure Push Notifications 3 IT Architect bij Info

    Support Architectuur, SOA, EAI, ESB, .NET, WCF, WF, Windows Azure Trekker Windows Azure Focusgroup Edwin van Wijk [email protected]
  2. Introductie Windows Azure Push Notifications 4 Architectuur, SOA, EAI, ESB,

    .NET, NServiceBus, Xamarin Trekker Mobile Development Focusgroup Dutch Mobile .NET developers group Roy Cornelissen [email protected] IT Architect bij Info Support
  3. Push Notifications infrastructuur Windows Azure Push Notifications 9 1. Haal

    DeviceHandle op 2. Registreer DeviceHandle in de backend 3. Stuur bericht met DeviceHandle 4. Stuur push-notification naar device Back-end Device PNS (APNS / WNS / GCM) 1 2 3 4
  4. Uitdagingen Windows Azure Push Notifications 10 Pub/Sub Routering Interesses koppelen

    aan device handles Schaalbaarheid Bijhouden device tokens Broadcasts Platform specifieke API
  5. Mogelijke oplossing Windows Azure Push Notifications 11 Apple Android Windows

    Backend Device# Scalability? PushSharp library PushSharp github.com/redth/pushsharp
  6. Servicebus Push Notification Hubs Windows Azure Push Notifications 14 Multi-

    platform iOS & WinRT Schaalbaar Pub/Sub Routering Tags Preview sinds januari 2013 (Android en Windows Phone later) Schatting GA: zomer 2013
  7. Servicebus Push Notification Hubs infrastructuur Windows Azure Push Notifications 15

    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 Back-end Device PNS (APNS / WNS / GCM) 1 Push Notification Hub 2 3 4 5
  8. Beheer van registraties Windows Azure Push Notifications 17 Client Back-end

    - Alleen update mogelijk als de app draait + Eenvoudige back-end Back-end Device Push Notification Hub Back-end Device Provide PNS Handle Push Notification Hub + Update mogelijk als de app niet draait (b.v. meerdere devices en tags) - Veel zelf doen in Back-end
  9. Notification formaat Windows Azure Push Notifications 18 Native Registratie zonder

    template Notification bevat body in platform specifiek formaat CreateNativeRegistration(…) SendWindowsNativeNotification(…) SendAppleNativeNotification(…) Templates Registratie met een template Notification bevat platform onafhankelijke properties CreateTemplateRegistration(…) SendTemplateNotification(…)
  10. Templates Windows Azure Push Notifications 19 <toast> <visual> <binding template="ToastText01">

    <text id="1">$(msg)</text> </binding> </visual> </toast> { "aps": { "alert": "$(msg)" } } WNS APNS hubClient.SendTemplateNotification( new Dictionary<string, string> { { "msg", "Hello world" } }, null, null );
  11. Pub/Sub routering m.b.v. Tags Windows Azure Push Notifications 20 Back-end

    Device 1 Device 2 Push Notification Hub Technologie Sport, Economie a b c a b c b Sport Technologie PNS niveau is verdwenen uit het plaatje
  12. Boodschappenlijst Windows Store App Windows Azure Push Notifications 21 Service

    Bus .NET Preview SDK NuGet 0.1.5.0 (07-05-2013) Service Bus WinRT Managed SDK Windows Store Development Account
  13. Boodschappenlijst iOS App Windows Azure Push Notifications 25 Service Bus

    .NET Preview SDK Service Bus iOS SDK Apple Developer Account
  14. 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 27
  15. iOS app bouwen Windows Azure Push Notifications 28 Azure Push

    Notification Hub iDevice APNS 1. registerForRemoteNotification 2. didRegisterForRemoteNotificationsWithDeviceToken lib Application back end 3. createTemplateRegistrationWithName (connectionstring + deviceToken + listenAccessSecret) 4. SendTemplateNotification 5. didReceiveRemoteNotification
  16. Bouwen met Xamarin.iOS C# language binding voor WindowsAzureMessaging C# library

    toevoegen in iOS app Bouwen in Xamarin Studio of Visual Studio