问题描述
希望有人能澄清这对我...我就可以播放存储在手机视频片段的简单视频播放器的应用程序的工作。
Hopefully someone can clarify this to me...I am working on a simple video player app that plays video clip stored on phone.
我已经看到了使用MediaStore.Video.Media.EXTERNAL_CONTENT_URI内容开放的,类似的东西获取视频的所有例子
All examples I've seen fetch video using MediaStore.Video.Media.EXTERNAL_CONTENT_URI content Uri, something like that
cursor = resolver.query(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, cols, whereClause, null, sortOrder);
但不会限制它在列表中只存储在SD卡上的文件?
But won't it limit the list to only files stored on SD card?
较新的Android手机有内存的显著数量 - 例如,三星Galaxy S通常自带16GB的内存和2GB的SD卡。
Newer android phones has significant amount of internal memory - for example, Samsung Galaxy S typically comes with 16Gb on internal memory and 2Gb sd card.
我应该扫描mediastore两次外部内容URI和内部呢?
Should I scan mediastore twice with external content uri and internal one?
我又看到了像10示例音频和视频播放器和所有的人都使用外部只。
Again I saw like 10 examples for audio and video players and all of them use external only.
即使<一个href=\"http://android.git.kernel.org/?p=platform/packages/apps/Music.git;a=blob;f=src/com/android/music/VideoBrowserActivity.java;h=e8aaf7480bfe5c5a72343e66b516921045b804fc;hb=refs/heads/froyo-release\"相对=nofollow>检查源$ C $ C为股票的音乐播放器并也只能从外部卡拉。
Even checked source code for the stock music player and it also pulls only from external card.
推荐答案
了一些测试,似乎这取决于答案。在Android模拟器和HTC的myTouch它获取外部SD卡的唯一项目,而三星Galaxy S它实际上从内部存储拉了。
ran some tests and it seems the answer it depends. On android emulator and HTC mytouch it fetches only items on external SD card, while on Samsung Galaxy S it actually pulls from internal storage too.
这是我真的很讨厌关于Android的一部分 - 为什么这样简单的事情是如此的不同。
This is the part I really hate about android - why such simple things are so different
这篇关于内部VS从mediastore取数据的外部URI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!