void RideDetailsListener_RideDetailsFound(object sender, RideDetailsListener.RideDetailsEventArgs e) { if (status != "NORMAL") { return; } newRideDetails = e.RideDetails; if (!isBackground) { CreateNewRequestDialogue(); } else { newRideAssigned = true; NotificationHelper notificationHelper = new NotificationHelper(); if ((int)Build.VERSION.SdkInt >= 26) { notificationHelper.NotifyVersion26(this, Resources, (NotificationManager)GetSystemService(NotificationService)); } /*else if((int)Build.VERSION.SdkInt < 26) * { * notificationHelper.NotifyOtherVersions(this, Resources, (NotificationManager)GetSystemService(NotificationService)); * }*/ } }
void RideDetailsListener_RideDetailsFound(object sender, RideDetailsListener.RideDetailsEventArgs e) { // if status not normal, it effects the code block if (status != "NORMAL") { return; } newRideDetails = e.RideDetails; // Alert when on background if (!isBackground) { CreateNewRequestDialogue(); } else { newRideAssigned = true; NotificationHelper notificationHelper = new NotificationHelper(); if ((int)Build.VERSION.SdkInt >= 26) { notificationHelper.NotifyVersion26(this, Resources, (NotificationManager)GetSystemService(NotificationService)); } } }
private void RideDetailsListener_RideDetailsFound(object sender, RideDetailsListener.RideDetailsEventArgs e) { newRideDetails = e.RideDetails; if (statusEnum != RideStatusEnum.Normal) { return; } if (isBackground) { newRideAssigned = true; if ((int)Build.VERSION.SdkInt >= 26) { NotificationHelper notificationHelper = new NotificationHelper(); notificationHelper.NotifyVersion26(this, Resources, (NotificationManager)GetSystemService(NotificationService)); } } else { CreateNewRequestDialog(); } }