Esempio n. 1
0
        public async void Run(IBackgroundTaskInstance taskInstance)
        {
            _deferral = taskInstance.GetDeferral();

            // Get the raw notification content
            RawNotification notification = (RawNotification)taskInstance.TriggerDetails;
            string          content      = notification.Content;

            //// Create sample file; replace if exists.
            //Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder;

            //Windows.Storage.StorageFile sampleFile =   await storageFolder.CreateFileAsync("sample.txt",
            //        Windows.Storage.CreationCollisionOption.ReplaceExisting);

            // Display a toast
            ToastHelper.PopToast("Push Notification received", content);

            _deferral.Complete();
        }
Esempio n. 2
0
 public void Run(IBackgroundTaskInstance taskInstance)
 {
     ToastHelper.PopToast("Pre-Install Task", "Pre install task is running", "OK");
 }