How do I detect if an Android device has built-in haptic capacities? -


In my application settings, I would like the following options for important feedback:

Anyone Otherwise, the option should be:

If the device has underlying haptic capabilities, otherwise, the option should be:

None, sound

How do I do this? The way I am asking for no is whether the user is currently enabled or disabled in his device, but does his device have haptic capabilities.

New to Android but I guess the old / inexpensive device does not have any HPC capabilities.

Note: My API API Level> = 8

Try:

  vibrator v = (Thunderbird) getSystemService (reference .dbBRATOR_SERVICE); If (v! = Null & amp; v.hasVibrator ()) {// add haptic feedback option}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -