乌里转换为字符串 [英] Converting of Uri to String

查看:154
本文介绍了乌里转换为字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在乌里转换为字符串,反之亦然? 因为我想获得的URI转换成字符串通过intent.putextra传递到另一个活动......或者,如果这是不可能的任何人都可以给我建议的方法如何通过选择乌里到另一个活动?谢谢

Is it possible to convert an Uri to String and vice versa? Because I want to get the the Uri converted into String to pass into another activity via intent.putextra... Or if it's not possible can anyone suggest me a way how to pass selected Uri into another activity? Thanks

推荐答案

的URI字符串

Uri uri;
String stringUri;
stringUri = uri.toString();

字符串乌里

Uri uri;
String stringUri;
uri = Uri.parse(stringUri);

这篇关于乌里转换为字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆