Note: This course is part 7 of a 9-part series, Mastering Xamarin.Forms Development, which explains how to build robust, cross-platform mobile apps with Xamarin.Forms. Visit Scott Peterson's instructor page to watch the entire series.
- Notification configurations for Android, iOS, and Windows
- Configuring push notification services
- Adding platform-specific notification support
- Responding to notifications
Skill Level Intermediate
- [Instructor] Back in the day, the concept of push notifications was unheard of. If a computer device needed information, it had to ask for it directly from file storage, a network share, a database, and later on, a web server. Inherent to the idea of push notifications, is the idea that the service knows about every device, knows how to reach that device, and knows how to handle communication, when a device becomes unavailable. Early attempts at push dial concepts were usually complex, like socket transfers, or prone to confusion, like duplex web services.
In the modern age of cloud computing, implementing push notifications is simple and straight forward, if you're intimately familiar with every platform and device. Just as Xamarin Forms makes it easy to create apps for every platform without needing to know Swift or Java, services now exist that can integrate with Xamirin Forms to leverage the power of push notification support without needing to understand the nuances of specific platforms. This is another area where the Xamarin Forms platform really shines.
I'm Scott J. Peterson, and this is Mastering Xamarin Forms Development Push Notifications. So what are push notifications and why do we care about push notifications in the mobile world? Well, quite simply, push notifications is a small simple piece of information in the form of a message that gets sent from a back-end system, like a push notification service or notification hub, in order to increase application engagement in usage. It's used primarily to communicate with the user, but it's also a phenomenal mechanism to communicate with the app itself.
A push notification can be sent at any time, even when a user is not actively using an application. This opens up some great opportunities, but also some great complexity, when we talk about sending push notifications across platforms where every device and every operating system has their own idea the way push notifications ought to look. So quite honestly, as I work with developers around the world, the concept of push notifications in cross platform scenarios, tends to be one of the biggest sore spots and one of the most problematic areas that they have.
Quite frankly, because there's a number of working parts and many of the pieces that are required to implement push notifications appropriately across platforms are changing and sometimes problematic. That being said, first part of this session is going to focus primarily on configuration and understanding all of the moving parts, when configuring notifications for Android, iOS and Windows. And how to harmonize those configurations using Azure Notification Hubs. We're actually going to go in and demo all of the working parts in configuring push notification services by going to those services themselves for Android, iOS and Windows.
Now we're going to talk about some common scenarios for push notifications that are way beyond this idea of sending an alert. And then we're going to talk about platform-specific services. This is one of the few topics where 98% of the code that we write will not be shared code. Almost all of the code that we write in Visual Studio and in Xamarin Forms is going to be platform-specific. Then we're going to go over into Visual Studio and implement platform-specific notification support for iOS, Android, and Windows.
And we're going to come back and talk about some concepts related to Azure mobile services that are really a no brainer when we integrate push notifications, concepts of easy tables and easy APIs, and being able to leverage the power of push notifications of Azure mobile services. And we're going to flip back to Visual Studio and talk about responding to notifications and a few advanced scenarios. And as always, we'll finish up with some great next steps.