Last active
July 26, 2017 14:30
-
-
Save e23z/654e79231cca1b9bd7a8153ea06934dc to your computer and use it in GitHub Desktop.
[Device Vibration] How to make the mobile device to vibrate for some action. #xamarin #ios #android #mobile #wp #ux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Android | |
| Vibrator vibrator = (Vibrator) this.ApplicationContext.GetSystemService(Context.VibratorService); | |
| // iOS | |
| SystemSound.Vibrate.PlayAlertSound(); | |
| // Windows Phone | |
| VibrateController testVibrateController = VibrateController.Default; | |
| vibrate.Start(TimeSpan.FromMilliseconds(1000)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment