Vibrating Phone at UWP

I am trying to use vibration on a device (Windows Phone), however I cannot find a suitable API to achieve this for Windows 10. On Windows 8.x I can use this , however it is no longer available on the Universal Windows Platform.

Can someone point me in the right direction?

+5
source share
3 answers

As of January 2016, you are:

Right-click the link in your solution, Add Link-> Extensions-> Windows Mobile Extensions for UWP

Then you can

using Windows.Phone.Devices.Notification;

and actually use it:

Windows.Phone.Devices.Notification.VibrationDevice v = VibrationDevice.GetDefault(); v.Vibrate(TimeSpan.FromMilliseconds(500));

+11
source

Posted as a comment a few minutes ago, and now I'm sure this is what you need:

Use the Windows.Phone.Devices.Notification.VibrationDevice class and the Vibrate method that it contains.

https://msdn.microsoft.com/en-us/library/windows/apps/windows.phone.devices.notification.vibrationdevice.vibrate

+2
source

check it out, can help you. and the link you use can be used with another api. the anotehr I found in the Microsoft documentation is that you cannot trust it, remember this https://msdn.microsoft.com/en-us/windows.phone.devices.notification.vibrationdevice.vibrate

0
source

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


All Articles