Android: how to read system settings for vibration when pressing keys

How can I programmatically read system settings for a virtual keyboard? I want my application buttons to behave as if they were installed in the system settings of the virtual keyboard (sound, vibration or nothing).

+5
source share
1 answer

For this you must use performHapticFeedback. Remember to enable it for your views in the xml layout.

View.performHapticFeedback

Use Stock Tactical Feedback

+1
source

All Articles