Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Androidx Preferences not incuding RingtonePreference

I'm doing the settings activity for my app via code since the xml editor wont find any preferences but PreferenceScreen. Via code everything is working but I can not find the RingtonePreferences from Androidx, the only one I find is the one from android.preference.RingtonePreference.

I have this implementation.

implementation "androidx.preference:preference:1.1.0-alpha02"

RingtonePreference has not been added yet? or there is another preference under another name I can use in order to let users choose a notification sound. Thanks!

like image 529
Alberto PR Avatar asked Jan 12 '19 11:01

Alberto PR


1 Answers

RingtonePreference has not been added yet?

Google has stated that their libraries will not support RingtonePreference.

or there is another preference under another name I can use in order to let users choose a notification sound

Use a ListPreference. Or use this workaround. Or create a custom Preference that integrates with the ringtone APIs.

like image 99
CommonsWare Avatar answered Sep 19 '22 18:09

CommonsWare