Android How to customize vibrator's various vibration mode m concrete method _android

Source: Internet
Author: User
The general vibration time is configured in the following file:
Copy Code code as follows:

Frameworks/base/core/res/res/values/config.xml
<!--long Press vibration-->
<!--vibrator pattern for feedback about a long screen/key press-->
<integer-array name= "Config_longpressvibepattern" >
<item>0</item>
<item>1</item>
<item>20</item>
<item>21</item>
</integer-array>

<!--virtual keypad vibration-->
<!--vibrator feedback about touching a virtual key-->
<integer-array name= "Config_virtualkeyvibepattern" >
<item>0</item>
<item>10</item>
<item>20</item>
<item>30</item>
</integer-array>

<!--soft keyboard key Vibration-->
<!--vibrator very short but reliable vibration for soft keyboard tap-->
<integer-array name= "Config_keyboardtapvibepattern" >
<item>40</item>
</integer-array>

<!--non-safe mode start Vibration-->
<!--vibrator feedback about booting with Safe mode disabled-->
<integer-array name= "Config_safemodedisabledvibepattern" >
<item>0</item>
<item>1</item>
<item>20</item>
<item>21</item>
</integer-array>

<!--Safe Mode starting vibration-->
<!--vibrator feedback about booting with Safe mode disabled-->
<integer-array name= "Config_safemodeenabledvibepattern" >
<item>0</item>
<item>1</item>
<item>20</item>
<item>21</item>
<item>500</item>
<item>600</item>
</integer-array>

In the form of an array, the odd position indicates the pause time, the even position indicates the vibration time, the unit is MS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.