Vibration on Xamarin Android

Im currently working on an application using Xamarin android. I can not connect the device to vibrate .

 Vibrator vibrator = (Vibrator)Activity.GetSystemService(Context.VibratorService); vibrator.Vibrate(100); 

It builds, but crashes when I click the button associated with the code.

+7
android c # xamarin vibration
source share
1 answer

This solves the AndroidManifest.xml problem.

 <uses-permission android:name="android.permission.VIBRATE"/> 
+5
source share

All Articles