File tree Expand file tree Collapse file tree 9 files changed +28
-0
lines changed Expand file tree Collapse file tree 9 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,14 @@ public static void Perform(HapticFeedbackType type = HapticFeedbackType.Click) =
3333
3434 static IHapticFeedback ? defaultImplementation ;
3535
36+ /// <summary>
37+ /// Gets a value indicating whether haptic feedback is supported on this device.
38+ /// </summary>
39+ public static bool IsSupported
40+ => Current . IsSupported ;
41+
42+ static IHapticFeedback Current => Devices . HapticFeedback . Default ;
43+
3644 /// <summary>
3745 /// Provides the default implementation for static usage of this API.
3846 /// </summary>
Original file line number Diff line number Diff line change @@ -23,3 +23,5 @@ static Microsoft.Maui.Media.MediaPicker.PickPhotosAsync(Microsoft.Maui.Media.Med
2323static Microsoft.Maui.Media.MediaPicker.PickVideosAsync(Microsoft.Maui.Media.MediaPickerOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.Maui.Storage.FileResult!>!>!
2424*REMOVED*static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult!>!>!
2525static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult?>!>!
26+ static Microsoft.Maui.Devices.HapticFeedback.IsSupported.get -> bool
27+ static Microsoft.Maui.Devices.Vibration.IsSupported.get -> bool
Original file line number Diff line number Diff line change @@ -23,3 +23,5 @@ static Microsoft.Maui.Media.MediaPicker.PickPhotosAsync(Microsoft.Maui.Media.Med
2323static Microsoft.Maui.Media.MediaPicker.PickVideosAsync(Microsoft.Maui.Media.MediaPickerOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.Maui.Storage.FileResult!>!>!
2424*REMOVED*static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult!>!>!
2525static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult?>!>!
26+ static Microsoft.Maui.Devices.HapticFeedback.IsSupported.get -> bool
27+ static Microsoft.Maui.Devices.Vibration.IsSupported.get -> bool
Original file line number Diff line number Diff line change @@ -23,3 +23,5 @@ static Microsoft.Maui.Media.MediaPicker.PickPhotosAsync(Microsoft.Maui.Media.Med
2323static Microsoft.Maui.Media.MediaPicker.PickVideosAsync(Microsoft.Maui.Media.MediaPickerOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.Maui.Storage.FileResult!>!>!
2424*REMOVED*static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult!>!>!
2525static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult?>!>!
26+ static Microsoft.Maui.Devices.HapticFeedback.IsSupported.get -> bool
27+ static Microsoft.Maui.Devices.Vibration.IsSupported.get -> bool
Original file line number Diff line number Diff line change @@ -11,3 +11,5 @@ static Microsoft.Maui.Authentication.WebAuthenticatorExtensions.AuthenticateAsyn
1111static Microsoft.Maui.Devices.Sensors.Geolocation.IsEnabled.get -> bool
1212*REMOVED*static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult!>!>!
1313static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult?>!>!
14+ static Microsoft.Maui.Devices.HapticFeedback.IsSupported.get -> bool
15+ static Microsoft.Maui.Devices.Vibration.IsSupported.get -> bool
Original file line number Diff line number Diff line change @@ -23,3 +23,5 @@ static Microsoft.Maui.Media.MediaPicker.PickPhotosAsync(Microsoft.Maui.Media.Med
2323static Microsoft.Maui.Media.MediaPicker.PickVideosAsync(Microsoft.Maui.Media.MediaPickerOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.Maui.Storage.FileResult!>!>!
2424*REMOVED*static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult!>!>!
2525static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult?>!>!
26+ static Microsoft.Maui.Devices.HapticFeedback.IsSupported.get -> bool
27+ static Microsoft.Maui.Devices.Vibration.IsSupported.get -> bool
Original file line number Diff line number Diff line change @@ -23,3 +23,5 @@ static Microsoft.Maui.Media.MediaPicker.PickPhotosAsync(Microsoft.Maui.Media.Med
2323static Microsoft.Maui.Media.MediaPicker.PickVideosAsync(Microsoft.Maui.Media.MediaPickerOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.Maui.Storage.FileResult!>!>!
2424*REMOVED*static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult!>!>!
2525static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult?>!>!
26+ static Microsoft.Maui.Devices.HapticFeedback.IsSupported.get -> bool
27+ static Microsoft.Maui.Devices.Vibration.IsSupported.get -> bool
Original file line number Diff line number Diff line change @@ -23,3 +23,5 @@ static Microsoft.Maui.Media.MediaPicker.PickPhotosAsync(Microsoft.Maui.Media.Med
2323static Microsoft.Maui.Media.MediaPicker.PickVideosAsync(Microsoft.Maui.Media.MediaPickerOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.Maui.Storage.FileResult!>!>!
2424*REMOVED*static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult!>!>!
2525static Microsoft.Maui.Storage.FilePicker.PickMultipleAsync(Microsoft.Maui.Storage.PickOptions? options = null) -> System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Maui.Storage.FileResult?>!>!
26+ static Microsoft.Maui.Devices.HapticFeedback.IsSupported.get -> bool
27+ static Microsoft.Maui.Devices.Vibration.IsSupported.get -> bool
Original file line number Diff line number Diff line change @@ -66,6 +66,12 @@ public static void Vibrate(TimeSpan duration) =>
6666 public static void Cancel ( ) =>
6767 Current . Cancel ( ) ;
6868
69+ /// <summary>
70+ /// Gets a value indicating whether vibration is supported on this device.
71+ /// </summary>
72+ public static bool IsSupported
73+ => Current . IsSupported ;
74+
6975 static IVibration Current => Devices . Vibration . Default ;
7076
7177 static IVibration ? defaultImplementation ;
You can’t perform that action at this time.
0 commit comments