2

I've a diagnostic app which currently tests vibration including other kind of tests as well. In case of vibration, it vibrates and asks user to input the count of vibration. Here is the code snippet I've been using,

vibrator = (Vibrator) getContext().getSystemService(Context.VIBRATOR_SERVICE);
vibrator.vibrate(vibrationPattern, -1);

Now, I got a complain that it's not been vibrating, The reason was Vibration intensity was set to 0 in settings of his device.

Please help me how I can overcome this, I've two options,

1. Request user to increase vibration intensity.

Is it possible to get how much vibration intensity is set in settings and redirect user to the belonging page?

2. Make a forceful vibration somehow.

Is it possible to vibrate going beyond the vibration intensity settings?

I've tried many possible ways but couldn't get through it. Any help will be appreciated.

Shree Krishna
  • 8,474
  • 6
  • 40
  • 68

1 Answers1

0

You can control the pattern and length of the vibration, but I don't think you can change its intensity.

This would remain limitation, you may like to redirect user to sound settings if the required feature didn't worked for him/her with an explaination message.

Intent intent = new Intent(Settings.ACTION_SOUND_SETTINGS);
startActivity(intent);

For complete Settings Intents

Hope it helps.

Sahil
  • 952
  • 1
  • 7
  • 14