简体   繁体   English

我的设备上的查询问题(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,null,null,null,null)

[英]problem with query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, null, null, null, null) on my device

I'm doing my first android application: a Voice recorder.我正在做我的第一个 android 应用程序:录音机。 After Recording a.wav file, I save it in my folder "Voice recorder" in the SD card.录制.wav 文件后,我将其保存在 SD 卡中的“录音机”文件夹中。 When I try to find all my registrations on the folder with当我尝试在文件夹中找到我的所有注册时

 Cursor cur = getContentResolver().query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, null, null, null, null);

the method return all files except those in my Folders (I have another directory with music).该方法返回除我的文件夹中的文件以外的所有文件(我有另一个包含音乐的目录)。 I tried to mount/unmount sdcrad too.我也尝试安装/卸载 sdcrad。

  1. Who updates the database associated with the media file?谁更新与媒体文件关联的数据库?

  2. When is it updated?什么时候更新? I have to do or to set something on device/code?我必须做或在设备/代码上设置一些东西?

  3. Are there permissions on folder to be set?是否有要设置的文件夹权限?

On the Android emulator the application works.在 Android 仿真器上,该应用程序有效。 I have a LG p500 with android 2.2.我有一台带有 android 2.2 的 LG p500。

thanks (I'm sorry for my English i'm italian) gianluca谢谢(对不起我的英语我是意大利人)gianluca

I am having similar issue for images.我对图像有类似的问题。 custom gallery using Mediastore query is not showing the recently taken images on lg optimus one p500 while it's working on other devices.使用 Mediastore 查询的自定义图库在 lg optimus one p500 上显示最近拍摄的图像,而它正在其他设备上工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MediaStore.Audio.Media.EXTERNAL_CONTENT_URI报告为未知URI - MediaStore.Audio.Media.EXTERNAL_CONTENT_URI reported as Unknown URI 在Android中的MediaStore.Audio.Media.EXTERNAL_CONTENT_URI中插入音频文件时出现问题 - problem while inserting audio file in MediaStore.Audio.Media.EXTERNAL_CONTENT_URI in android MediaStore.Audio.Media.EXTERNAL_CONTENT_URI返回一个空游标 - MediaStore.Audio.Media.EXTERNAL_CONTENT_URI return an empty cursor ContentResolver 插入 MediaStore.Audio.Media.EXTERNAL_CONTENT_URI 错误 - ContentResolver insert MediaStore.Audio.Media.EXTERNAL_CONTENT_URI error Android 9 (Pie) ContentResolver 查询 MediaStore.Images.Media.EXTERNAL_CONTENT_URI 在 api 28 上返回 null - Android 9 (Pie) ContentResolver query MediaStore.Images.Media.EXTERNAL_CONTENT_URI returns null on api 28 managedQuery(Media.EXTERNAL_CONTENT_URI,projection,null,null,null); 在设备上运行时返回null - managedQuery(Media.EXTERNAL_CONTENT_URI, projection,null,null, null); returns null when running on device 在查询`MediaStore.Audio.Media.EXTERNAL_CONTENT_URI`之前,有没有办法强制系统媒体重新扫描? - Is there any way to force a system media rescan before querying `MediaStore.Audio.Media.EXTERNAL_CONTENT_URI`? api 29+ 已弃用 MediaStore.Audio.Media.EXTERNAL_CONTENT_URI? - MediaStore.Audio.Media.EXTERNAL_CONTENT_URI is deprecated for api 29+? MediaStore.Audio.Media.EXTERNAL_CONTENT_URI不扫描数据文件夹内部 - MediaStore.Audio.Media.EXTERNAL_CONTENT_URI does not scan inside data folder 使用PICK_ACTION和MediaStore.Audio.Media.EXTERNAL_CONTENT_URI时是否可以过滤或删除显示的结果? - Is it possible to filter or remove results shown when using PICK_ACTION and MediaStore.Audio.Media.EXTERNAL_CONTENT_URI?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM