Popular Posts

May 6, 2012

Using Vibrator in android



-Add permission to android Manifest file
 <uses-permission android:name="android.permission.VIBRATE" />

- In java file:
 Vibrator vibrator;
- In Oncreage:
 vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);

- Use it:
 vibrator.vibrate(30);

No comments:

Post a Comment