Push Notifications - Introduction to PushSharp Seminar

38,688 views
38,267 views

Published on

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.

Published in: Technology
3 Comments
20 Likes
Statistics
Notes
No Downloads
Views
Total views
38,688
On SlideShare
0
From Embeds
0
Number of Embeds
18,257
Actions
Shares
0
Downloads
359
Comments
3
Likes
20
Embeds 0
No embeds

No notes for slide
  • \n
  • Book promo code\n
  • \n
  • \n
  • \n
  • \n
  • If only there was a better way... Extra Advance\n
  • \n
  • \n
  • Extra Advance\n
  • Extra Advance\n
  • Extra Advance\n
  • \n
  • \n
  • \n
  • Book promo code\n
  • Book promo code\n
  • 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

    ×