作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我知道如何检索特定歌曲的流派(请参阅 getting the genres ),但我想检索特定流派的所有歌曲。由于“流派”似乎不是媒体项目的列之一,所以我不知道如何在单个查询中做到这一点,这与艺术家或专辑不同。有没有有效的方法?谢谢!
最佳答案
Uri uri = Audio.Genres.Members.getContentUri("external", genreID);
String[] projection = new String[]{Audio.Media.TITLE, Audio.Media._ID};
Cursor cur = contentResolver.query(uri, projection, null, null, null);
关于安卓媒体商店 : How to efficiently retrieve all songs of a certain genre?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8512882/
我是一名优秀的程序员,十分优秀!