public static void Notification(NotificationFeedback feedback) { if (PlayerPrefs.GetInt("VIBRATION") == 1) { _unityTapticNotification((int)feedback); } }
public async Task SendFeedback(NotificationFeedback feedback) { var notification = feedback.SendingStatus switch { SendingStatuses.Received => await _context.Notifications .SingleOrDefaultAsync(n => n.Id == feedback.MessageId && (n.SendingStatus == SendingStatuses.Sent)), SendingStatuses.Read => await _context.Notifications .SingleOrDefaultAsync(n => n.Id == feedback.MessageId && (n.SendingStatus == SendingStatuses.Sent || n.SendingStatus == SendingStatuses.Received)), _ => null }; if (notification is null) { return; } notification.SendingStatus = feedback.SendingStatus; switch (feedback.SendingStatus) { case SendingStatuses.Received: notification.Received = feedback.StatusChangeTime; break; case SendingStatuses.Read: notification.Read = feedback.StatusChangeTime; break; } _context.Notifications.Update(notification); await _context.SaveChangesAsync(); }
public static void Notification(NotificationFeedback feedback) { if (!Enabled) { return; } _unityTapticNotification((int)feedback); }
public static void Notification(NotificationFeedback notificationFeedback) { #if UNITY_IOS TapticManager.Notification(notificationFeedback); #elif UNITY_ANDROID AndroidHapticManager.Notification(notificationFeedback); #endif }
/// <summary> /// An overloaded method where you can change the notification feedback type /// </summary> /// <param name="notificationFeedback">Notification feedback type: Success/Warning/Error</param> public static void Vibrate(NotificationFeedback notificationFeedback) { #if UNITY_ANDROID && !UNITY_EDITOR Vibrate(AndroidHapticManager.HapticFeedback()); #elif UNITY_IOS && !UNITY_EDITOR Vibrate(Notification(notificationFeedback)); #else VibrateUnity(); #endif }
public static void Notification(NotificationFeedback feedback) { _unityTapticNotification((int)feedback); }
public static void TriggerNotification(NotificationFeedback feedback) { _unityTapticTriggerNotification((int)feedback); }
//private static void Vibrate(bool isHapticSupported) //{ // if (!isHapticSupported) // VibrateUnity(); //} private static bool Notification(NotificationFeedback feedback = NotificationFeedback.Success) { return(_unityHapticNotification((int)feedback)); }
public static void Notification(NotificationFeedback notificationFeedback) { //#if UNITY_ANDROID && !UNITY_EDITOR // return UnityPlayer.Call<bool> ("performHapticFeedback",HapticFeedbackConstantsKey); //#endif }