How to convert a String to an android.net.Uri -
question: have found java.net.uri
has create(string uri) option android.net.uri
not.
more specific: trying grab output of ringtonemanager's ringtonepicker , set default ringtone setactualdefaultringtoneuri;
intent intent = new intent(ringtonemanager.action_ringtone_picker); intent.putextra( ringtonemanager.extra_ringtone_type ,ringtonemanager.type_ringtone); intent.putextra( ringtonemanager.extra_ringtone_title , "select tone rainy days"); startactivityforresult(intent, 0); ringtonemanager.setactualdefaultringtoneuri(this ,ringtonemanager.type_ringtone ,ringtonemanager.extra_ringtone_picked_uri);
problem being ,ringtonemanager.extra_ringtone_picked_uri returns string not uri. there might better way convert string uri. cannot find reason why java.net.uri can , android.net.uri can't.
any suggestions appreciated!
thanks
i guess want use parse
method android.net.uri
class. returns uri supplied encoded string.
Comments
Post a Comment