I show a dialog for selecting one of the native ring tones / text tones with the following code:
private void showTonePicker(int toneType, String pickerTitle) {
[...]
Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, toneType);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, pickerTitle);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, userTone.equals(TFSettings.SILENT_TONE_ID) ? null : Uri.parse(userTone));
startActivityForResult(intent, (toneType == RingtoneManager.TYPE_RINGTONE ? 1 : 2));
}
I call the above method like this:
- for selecting text tone: showTonePicker(RingtoneManager.TYPE_NOTIFICATION, getString(R.string.texting_tone));
- for selecting ring tone: showTonePicker(RingtoneManager.TYPE_RINGTONE, getString(R.string.ringing_tone));
I have two problems to solve:
I must show lower cased buttons
In both cases (i.e. when selecting ring tone and also when selecting text tone), the native dialof shows "Default ringtone". I must display "Default text tone" in case of selecting a text tone (in this case toneType = RingtoneManager.TYPE_NOTIFICATION).
Is there a way to resolve these? Can we customize the native tone picker?
Thanks for the answers in advance!
Regards.
from Is there a way to customize the Android Ringtone Picker Dialog?
0 komentar:
Posting Komentar