Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vibrate Phone in UWP

I'm trying to use the vibration on the device (Windows Phone), however I can't seem to find the appropriate API to achieve this for Windows 10. In Windows 8.x, I can use this, however this is no longer available in Universal Windows Platform.

Can anyone point me in the right direction?

like image 446
Mike Eason Avatar asked Nov 03 '15 15:11

Mike Eason


Video Answer


1 Answers

As of Jan 2016, you:

Right-click References in your Solution, Add Reference->Extensions->Windows Mobile Extensions for the UWP

Then you can

using Windows.Phone.Devices.Notification;

and actually use it by:

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

like image 99
andymule Avatar answered Sep 28 '22 04:09

andymule