Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Created April 13, 2018 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juucustodio/8d5f3721854290695811a44d3ce6513c to your computer and use it in GitHub Desktop.
Save juucustodio/8d5f3721854290695811a44d3ce6513c to your computer and use it in GitHub Desktop.
Example of how to vibrate device in Xamarin.Forms applications - http://julianocustodio.com/vibrate
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Plugin.Vibrate;
using Xamarin.Forms;
namespace DemoVibrate
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
public void ButtonClick(object sender, EventArgs e)
{
CrossVibrate.Current.Vibration(TimeSpan.FromSeconds(1));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment