Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Xamarin   Seminar      9th August 2012    Copyright 2012 © Xamarin Inc. All rights reserved
AgendaPush Notifications - Introduction to Push Sharp                                  Jonathan Dick                       ...
Push Notifications            What are they?    Why Should I use them?      How do they work?        Platform Specifics     ...
What are Push              Notifications?• Think Growl but for Mobile• Small bits of information only• Pushed instead of Pu...
Why use Push              Notifications?•More realtime than Polling•Scalability - many apps, one connection•Lower resource ...
How do Push Notifications                 Work?Registering for Push Notifications 1. App requests Push Notification Registrat...
Platform Specific Implementations•Each platform has its own Implementation • Apple Push Notification Service (APNS) • Google...
Platform Specific Implementations•Each platform has its own Implementation • Apple Push Notification Service (APNS) • Google...
PushSharp to the Rescue!• Open Source - Apache 2.0 License• Abstraction of APNS, GCM, Windows Phone• Fluentish API for bui...
Sample Time !!1!                                                       Xamarin   Copyright 2012 © Xamarin Inc. All rights ...
Apple Sample                                                     Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
Apple Sample                                                     Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
Google Sample                                                      Xamarin  Copyright 2012 © Xamarin Inc. All rights reser...
Google Sample                                                      Xamarin  Copyright 2012 © Xamarin Inc. All rights reser...
Windows Phone 7 Sample                                                           Xamarin       Copyright 2012 © Xamarin In...
Windows Phone 7 Sample                                                           Xamarin       Copyright 2012 © Xamarin In...
Alternatives to PushSharp•3rd party Push Notification Services • Provide some abstraction • Easier to handle device registr...
Pitfalls to Avoid• Read the PushSharp GitHub wiki• Read documentation for each platform• Apple will make your cry • Develo...
Questions?                                                      Xamarin  Copyright 2012 © Xamarin Inc. All rights reserved
ReferencesPushSharp Project Site:https://github.com/redth/PushSharpFollow me on Twitter: @redthMy Blog: http://redth.infoU...
Xamarin    Seminar   Please give us your feedback  http://bit.ly/xamfeedback      Follow us on Twitter        @XamarinHQ  ...
Nächste SlideShare
Wird geladen in …5
×

Push Notifications - Introduction to PushSharp Seminar

41.639 Aufrufe

Veröffentlicht am

Video for this session: http://www.youtube.com/watch?v=MytQ6vqrE5g

Code for this session: Code for this session: https://github.com/xamarin/Seminars/tree/master/2012-08-09-PushSharp

Give your feedback on the session: http://bit.ly/xamfeedback

This session goes through an introduction to Push Notifications on iOS, Android and Windows Phone, how this is implemented on the different platforms and how the open source project PushSharp can allow you to stay with C# and make Push Notifications a breeze.

Veröffentlicht in: Technologie

Push Notifications - Introduction to PushSharp Seminar

  1. 1. Xamarin Seminar 9th August 2012 Copyright 2012 © Xamarin Inc. All rights reserved
  2. 2. AgendaPush Notifications - Introduction to Push Sharp Jonathan Dick DBA, Mobile App Developer jondick@gmail.com Twitter: @redth Blog: http://redth.info Professional Android Programming with Mono for Android and .NET/C# (Co-Author) http://amzn.to/MyKMZy Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  3. 3. Push Notifications What are they? Why Should I use them? How do they work? Platform Specifics PushSharp Library Pitfalls to avoid Alternative Ways to Send them Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  4. 4. What are Push Notifications?• Think Growl but for Mobile• Small bits of information only• Pushed instead of Pulling• Platforms have specific API’s Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  5. 5. Why use Push Notifications?•More realtime than Polling•Scalability - many apps, one connection•Lower resource consumption•Easier than ‘rolling your own’ Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  6. 6. How do Push Notifications Work?Registering for Push Notifications 1. App requests Push Notification Registration 2. Unique Registration ID generated by provider 3. ID sent to your Cloud ServiceSending a Push Notification 1. Your cloud service builds notification with Unique Registration ID of device 2. Notification is sent to Provider Push Notification Gateway 3. Provider’s Push Notification Gateway delivers the notification to the device Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  7. 7. Platform Specific Implementations•Each platform has its own Implementation • Apple Push Notification Service (APNS) • Google Cloud Messaging (GCM) • Windows Phone Notification Service•Apple is most difficult to work with•Many 3rd party libraries exist • APNS-Sharp, C2DM-Sharp, EasyAPNS, etc. Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  8. 8. Platform Specific Implementations•Each platform has its own Implementation • Apple Push Notification Service (APNS) • Google Cloud Messaging (GCM) • Windows Phone Notification Service•Apple is most difficult to work with•Many 3rd party libraries exist • APNS-Sharp, C2DM-Sharp, EasyAPNS, etc. If only there was a better way... Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  9. 9. PushSharp to the Rescue!• Open Source - Apache 2.0 License• Abstraction of APNS, GCM, Windows Phone• Fluentish API for building notifications• Sample code: MonoTouch & Mono for Android• Managed Code: MS.NET CLR, Mono, Azure• GitHub - Fork & Contribute• BuddyTV App currently sending 100,000+ / day Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  10. 10. Sample Time !!1! Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  11. 11. Apple Sample Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  12. 12. Apple Sample Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  13. 13. Google Sample Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  14. 14. Google Sample Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  15. 15. Windows Phone 7 Sample Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  16. 16. Windows Phone 7 Sample Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  17. 17. Alternatives to PushSharp•3rd party Push Notification Services • Provide some abstraction • Easier to handle device registrations•Urban Airship - most popular•Parse.com - ‘Channels’ concept•Drawbacks of 3rd Party Services • Do not support all platforms • Another API to code against • Still need your own Cloud Service to generate notifications Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  18. 18. Pitfalls to Avoid• Read the PushSharp GitHub wiki• Read documentation for each platform• Apple will make your cry • Development Provisioning Profile must use Sandbox Server • AdHoc & AppStore Provisioning Profiles must use Production Server • Make sure you export your Push SSL Certificate WITH Private Key• Push Notifications not guaranteed to be delivered• Google C2DM is deprecated - use GCM now Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  19. 19. Questions? Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  20. 20. ReferencesPushSharp Project Site:https://github.com/redth/PushSharpFollow me on Twitter: @redthMy Blog: http://redth.infoUrban Airship - http://urbanairship.comParse.com - http://parse.com Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  21. 21. Xamarin Seminar Please give us your feedback http://bit.ly/xamfeedback Follow us on Twitter @XamarinHQ 9th August 2012 Copyright 2012 © Xamarin Inc. All rights reserved

×