/// <summary> /// Запустить вибрацию уведомления. /// </summary> /// <param name="type">Тип уведомления.</param> private async Task StartVibration(AppNotificationType type) { switch (type) { case AppNotificationType.Error: await _deviceVibrationService.Vibrate(ErrorNotificationVibrationData); break; case AppNotificationType.Warning: await _deviceVibrationService.Vibrate(WarningNotificationVibrationData); break; case AppNotificationType.Info: await _deviceVibrationService.Vibrate(InfoVibrationDuration); break; default: await _deviceVibrationService.Vibrate(DefaultNotificationVibrationData); break; } }
/// <summary> /// Воспроизвести звук уведомления. /// </summary> /// <param name="type">Тип уведомления.</param> private async Task PlaySound(AppNotificationType type) { switch (type) { case AppNotificationType.Error: await _soundService.PlaySound(ERROR_NOTIFICATION_SOUND_SOURCE); break; case AppNotificationType.Warning: await _soundService.PlaySound(WARNING_NOTIFICATION_SOUND_SOURCE); break; case AppNotificationType.Info: await _soundService.PlaySound(INFO_NOTIFICATION_SOUND_SOURCE); break; default: await _soundService.PlaySound(DEFAULT_NOTIFICATION_SOUND_SOURCE); break; } }
public void RaiseNotification(String message, AppNotificationType type) { if (_appNotificationServiceProfile != null && type < _appNotificationServiceProfile.MinNotificationLevel) { return; } NotificationRaised?.Invoke(this, new AppNotificationRaisedData(message, type)); _onNotificationUnityEvent?.Invoke(); }
internal static DebugNotificationType ToDebugMsgType(AppNotificationType aType) { switch (aType) { case AppNotificationType.Critical: return(DebugNotificationType.Critical); case AppNotificationType.Custom: return(DebugNotificationType.Custom); case AppNotificationType.Error: return(DebugNotificationType.Error); case AppNotificationType.Information: return(DebugNotificationType.Information); case AppNotificationType.None: return(DebugNotificationType.None); case AppNotificationType.Question: return(DebugNotificationType.Question); case AppNotificationType.Suggestion: return(DebugNotificationType.Suggestion); case AppNotificationType.Warning: return(DebugNotificationType.Warning); } return(DebugNotificationType.None); }
public AppNotificationRaisedData(String message, AppNotificationType type) { Message = message; Type = type; }
public TypedNotification(AppNotificationType type, Object notificationBody) { this.Type = type; this.Notification = notificationBody; }
public TextData(string text, AppNotificationType type) { Text = text; Type = type; }