AndroidNativeCore.Vibrator

Description

This class offers methods of vibrate android device with normal and with pattern effect.

You need add "android.permission.VIBRATE" Permission to work this feature Check How to add Android Permission with simple clicks.

Summary:
Public static methods
void

Vibrate(long milliSeconds)

this method vibrate device by long number of milliSeconds

void

Vibrate(long[] pattren, int repet)

This method vibrate device by long[]an array of longs of times for which to turn the vibrator on or off and int the index into pattern at which to repeat, or -1 if you don't want to repeat.

void

Cansel()

Turn the vibrator off.

Example
    
using AndroidNativeCore;

void Start()
{
//This code vibrate 1s;
Vibrator.Vibrate(1000);

//This code vibrate as pattren
Vibrator.vibrate({200,400,600});

//This code cansel all vibrations
Vibrator.Cansel();
}