Display list of vibration types in Android

232 views Asked by At

I am working on an Android app where in I need to display the vibration types to the user to select similar to what WhatsApp does in the Notification settings screen.

Just as the RingtoneManager class provides the following ACTION_RINGTONE_PICKER as seen in below code snippet, do we have a similar ACTION_VIBRATION_PICKER. How should I go about implementing the same?

 final Intent ringtone = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
ringtone.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);
ringtone.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
ringtone.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI,
        RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));
startActivityForResult(ringtone, 0);

enter image description here enter image description here

0

There are 0 answers