Why isnt my phone vibrating when i press the button?

前端 未结 3 1610
囚心锁ツ
囚心锁ツ 2021-01-21 10:43

Hi im trying to make it that when a user clicks on on a button the phone vibrates. Heres manifest.xml and AndroidVibrator.java so whats wrong? how can i fix it? thanks!

相关标签:
3条回答
  • 2021-01-21 11:21

    I've responded to your previous post about the same matter

    this time you place the permissions over uses sdk...

    check my other answer.

    Also check the ouput of LogCat. Does your application force closes?

    0 讨论(0)
  • 2021-01-21 11:27

    Make sure you call

      <uses-permission android:name="android.permission.VIBRATE" />
    

    In your manifest

    EDIT:

    Try putting your permission at the end of the manifest, or after version code.

    0 讨论(0)
  • 2021-01-21 11:41

    may be 50 ms is too short to feel vibrate try more than 50ms

    0 讨论(0)
提交回复
热议问题