Access Vibration Function in Windows 8 WinRT?

Is there a WinRT API in Windows 8 or Windows Phone 8 to use the vibration function?

+6
source share
4 answers

Try the following: (only works on Windows Phone!)

var vibrationTime = TimeSpan.FromMilliseconds(100); Windows.Phone.Devices.Notification.VibrationDevice.GetDefault().Vibrate(vibrationTime); 
+4
source

The leaked documents mention the Microsoft.Devices.VibrateController class, available in both WP7 and WP8. I don’t think there is anything like that in WinRT. I think tablets usually don't have a vibrator? This seems to be more like a phone feature that you can store in your pocket.

Some articles on vibration

+2
source

We have one for Windows Phone 8 and 7, but we do not have a WinRT tablet

0
source

You can use the VibrateController or VibrationDevice class to achieve the vibration effect in Windows Phone applications.

See http://blogs.msdn.com/b/paraswadehra/archive/2014/06/25/how-to-make-your-windows-phone-app-vibrate.aspx for more details.

0
source

Source: https://habr.com/ru/post/922083/


All Articles