Is there a WinRT API in Windows 8 or Windows Phone 8 to use the vibration function?
Try the following: (only works on Windows Phone!)
var vibrationTime = TimeSpan.FromMilliseconds(100); Windows.Phone.Devices.Notification.VibrationDevice.GetDefault().Vibrate(vibrationTime);
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
We have one for Windows Phone 8 and 7, but we do not have a WinRT tablet
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.
Source: https://habr.com/ru/post/922083/More articles:Is it possible to "speak" with a running process? - c #How to authenticate on two different symfony2 firewalls at the same time? - securityRails Render part of a form inside another form - ruby-on-railsJava element initialization - javaOnly IE7 stylesheet for XSL document - cssJava console menu library. Is there an easy way to create a command line menu? - javaHow to install and use sqlobject + mysql on python hardware? - mysqliOS 5 - Is there a way to turn off autocomplete in a UITextView, but keep spell checking (red underline)? - iosreplace "\" with "" in java - javaJava, how to replace backslash? - javaAll Articles