URI和Uri类有什么区别 [英] What is the difference between URI and Uri class

查看:68
本文介绍了URI和Uri类有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很困惑,如何使用 Uri ,因为我正在 Intent's Action Dial

I am confused , how to use Uri because i am using it in android development at Intent's Action dial

Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:555-2368"));

我想做什么:

我想创建一个文件,我想在其中放入2个电话号码.然后,我想对该文件使用 toUri()方法,并想将 Uri 放入意图中,然后我想看看意图会发生什么.

I want to create a file inside which I want to put 2 phone numbers. Then, I want to use toUri() method with this file, and want to put that Uri in the intent, then I want to see what happens with the intent.

推荐答案

根据

According to the Android API docs you can create a file Uri with:

公共静态Uri fromFile(文件文件)

这篇关于URI和Uri类有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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