Client-Side Code
After completing the push notification wizard, the following field is placed inside your App
class in App.xaml.cs
:
// http://go.microsoft.com/fwlink/?LinkId=290986&clcid=0x409 public static MobileServiceClient chapter24Client = new MobileServiceClient( "https://chapter24.azure-mobile.net/", "...");
This configures the object that communicates with your service with the service’s URL and its application key. The awkwardly-lowercase chapter24Client
name comes from the service’s name of chapter24.
In addition, the following code is inserted at the end of App
’s OnLaunched
method:
// http://go.microsoft.com/fwlink/?LinkId=290986&clcid=0x409 Chapter24.chapter24Push.UploadChannel(); ...
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.