Monday, November 2, 2009

Adding Vibration to your Android Application

Below are the simple steps to enable the vibration feature for your Android application. There are two things you will need to take care of - the AndroidManifest.xml file and the Vibrate class.

[1] Add this line in manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
. . .
. . .
. . .
<uses-permission android:name="android.permission.VIBRATE">permission>
</manifest>

[2] Add these two lines in your class definition.

0 comments:

Post a Comment