-1

I have root. I use Blackberry Hub on my phone, but it vibrates too strong when notifying new mail. So how can I change that?

1 Answers1

0

To change vibration pattern pragmatically you need to implement custom code for that means you need to implement default vibration with diff diff seconds limit.

if (IS_VIBRATE) {
            IS_VIBRATE = true;
            final Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
            if (v.hasVibrator()) {
                final long[] pattern = {0, 100, 500, 100, 500, 100, 500, 100, 500, 100};
                new Thread() {
                    @Override
                    public void run() {
                        for (int i = 0; i < 10; i++) {
                            v.vibrate(pattern, -1);
                            try {
                                Thread.sleep(3000);
                            } catch (InterruptedException e) {
                                e.printStackTrace();
                            }
                        }
                    }
                }.start();
            }
        }

And yes, make sure you have in the AndroidManifest.xml file.

Nikhil Borad
  • 2,065
  • 16
  • 20