[英]EXTERNAL_CONTENT_URI and INTERNAL_CONTENT_URI both fetch videos from internal memory card in android
I write the code which fetches videos from both MediaStore.Video.Media.EXTERNAL_CONTENT_URI
and INTERNAL_CONTENT_URI
using context.getContentResolver().query()
. 我编写了使用
context.getContentResolver().query()
从MediaStore.Video.Media.EXTERNAL_CONTENT_URI
和INTERNAL_CONTENT_URI
两者中获取视频的代码。
But It fetches videos only from Internal Memory
. 但是它只能从
Internal Memory
获取视频。 I didnt fetch sdcard video files.I also add read and write permissions both on Manifest
. 我没有提取sdcard视频文件。我还对
Manifest
添加了读写权限。 It works on Samsung Jelly Bean
but not work on Micromax A110 Jelly Bean
. 它适用于
Samsung Jelly Bean
但不适用于Micromax A110 Jelly Bean
。 Please help me with this problem I tried this since last 3 days.* 请帮我解决这个问题,我从最近3天开始尝试过此方法。*
But It fetches videos only from Internal Memory
但是它只能从内部存储器中获取视频
That will depend entirely upon the device manufacturer, and whether that manufacturer arranges to add removable media files to the MediaStore
(and later remove them if that media is ejected). 这将完全取决于设备制造商以及该制造商是否安排将可移动媒体文件添加到
MediaStore
(然后在弹出该媒体时将其删除)。
So, for example, this sample app properly shows videos on a micro SD card in my SONY Tablet Z2. 因此,例如, 此示例应用程序正确显示了SONY Tablet Z2中微型SD卡上的视频。 It uses
EXTERNAL_CONTENT_URI
: 它使用
EXTERNAL_CONTENT_URI
:
@Override
public Loader<Cursor> onCreateLoader(int arg0, Bundle arg1) {
return(new CursorLoader(
getActivity(),
MediaStore.Video.Media.EXTERNAL_CONTENT_URI,
null, null, null,
MediaStore.Video.Media.TITLE));
}
It works on Samsung Jelly Bean but not work on Micromax A110 Jelly Bean.
它适用于Samsung Jelly Bean,但不适用于Micromax A110 Jelly Bean。 Please help me with this problem I tried this since last 3 days.*
请帮我解决这个问题,我从最近3天开始尝试过此方法。*
Contact Micromax and complain about their Android implementation. 与Micromax联系并投诉其Android实施。 Your code is probably perfectly fine, but there is nothing you can do about devices whose manufacturers do not handle removable media properly.
您的代码可能很好,但是对于制造商不能正确处理可移动媒体的设备,您无能为力。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.