void Push_ToastPushReceived(object sender, Radiumone.Connect.PushInfo.ToastPushReceivedEventArgs e) { string relativeUri = string.Empty; string title = string.Empty; string text = string.Empty; // Parse out the information that was part of the message. foreach (string key in e.Collection.Keys) { if (string.Compare( key, "wp:Param", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.CompareOptions.IgnoreCase) == 0) { relativeUri = e.Collection[key]; } else if (string.Compare( key, "wp:Text1", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.CompareOptions.IgnoreCase) == 0) { title = e.Collection[key]; } else if (string.Compare( key, "wp:Text2", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.CompareOptions.IgnoreCase) == 0) { text = e.Collection[key]; } } Dispatcher.BeginInvoke(() => { if (MessageBox.Show(text + "\nOpen Page?", title, MessageBoxButton.OKCancel) == MessageBoxResult.OK) { NavigationService.Navigate(new Uri(relativeUri, UriKind.Relative)); } }); }
void Instance_ToastPushReceived(object sender, Radiumone.Connect.PushInfo.ToastPushReceivedEventArgs e) { var js = JsonConvert.SerializeObject(e.Collection); FireDocumentEvent("'R1Push.foregroundNotification', " + js); }
void Instance_ToastChannelUpdated(object sender, Radiumone.Connect.PushInfo.ToastChannelUpdatedEventArgs e) { FireDocumentEvent("'R1Push.deviceToken', {deviceToken:'" + e.ChannelUri.ToString() + "'}"); }
void LocationService_StateUpdated(object sender, Radiumone.Connect.LocationService.StateUpdatedEventArgs e) { UpdateState(); }
void LocationService_LastCoordinateUpdated(object sender, Radiumone.Connect.LocationService.LastLocationUpdatedEventArgs e) { UpdateLocation(); }