原始文件夹的URL路径? [英] Raw folder url path?

查看:236
本文介绍了原始文件夹的URL路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能获得的原始文件夹中的网址是什么?我不想通过ID,而是由路径,而不是访问我的财富。

感谢您的帮助,您可以提供!

解决方案

 开放的视频= Uri.parse(android.resource://com.cpt.sample/raw/filename );
 

使用此您可以访问原始文件夹中的文件,如果您要访问的资源文件夹中的文件,使用此URL ......

 文件:/// android_asset /文件名
 

How can I get the url of the raw folder? I do not want to access my asset via id but by path instead.

Thanks for any help that you can provide!

解决方案

Uri video = Uri.parse("android.resource://com.cpt.sample/raw/filename");

Using this you can access the file in raw folder, if you want to access the file in asset folder use this URL...

file:///android_asset/filename

这篇关于原始文件夹的URL路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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