本文整理汇总了Java中android.provider.MediaStore.Audio.Albums.ALBUM_KEY属性的典型用法代码示例。如果您正苦于以下问题:Java Albums.ALBUM_KEY属性的具体用法?Java Albums.ALBUM_KEY怎么用?Java Albums.ALBUM_KEY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.provider.MediaStore.Audio.Albums
的用法示例。
在下文中一共展示了Albums.ALBUM_KEY属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAlbum
/**
* @Description 得到原图
*/
@SuppressWarnings("unused")
private void getAlbum() {
String[] projection = {
Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS
};
Cursor cursor = null;
try {
cursor = contentResolver.query(Albums.EXTERNAL_CONTENT_URI,
projection, null, null, null);
getAlbumColumnData(cursor);
} catch (Exception e) {
logger.e(e.getMessage());
} finally {
if (null != cursor) {
cursor.close();
}
}
}
示例2: getAlbum
/**
* 得到原图
*/
void getAlbum() {
String[] projection = {Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS};
Cursor cursor = cr.query(Albums.EXTERNAL_CONTENT_URI, projection, null,
null, null);
getAlbumColumnData(cursor);
}
示例3: getAlbum
void getAlbum() {
String[] projection = { Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS };
Cursor cursor = cr.query(Albums.EXTERNAL_CONTENT_URI, projection, null,
null, null);
getAlbumColumnData(cursor);
}
示例4: getAlbum
/**
* �õ�ԭͼ
*/
void getAlbum() {
String[] projection = { Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS };
Cursor cursor = cr.query(Albums.EXTERNAL_CONTENT_URI, projection, null,
null, null);
getAlbumColumnData(cursor);
}
示例5: getAlbum
void getAlbum() {
String[] projection = { Albums._ID, Albums.ALBUM, Albums.ALBUM_ART, Albums.ALBUM_KEY, Albums.ARTIST,
Albums.NUMBER_OF_SONGS };
Cursor cursor = cr.query(Albums.EXTERNAL_CONTENT_URI, projection, null, null, null);
getAlbumColumnData(cursor);
}
示例6: getAlbum
public void getAlbum(){
String[] projection = { Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS };
Cursor cursor = resolver.query(Albums.EXTERNAL_CONTENT_URI, projection, null,
null, Albums._ID+" desc");
if(cursor.moveToFirst()){
int _id;
String album ;
String albumArt ;
String albumKey;
String artist;
int numOfSongs;
int _idColumn = cursor.getColumnIndex(Albums._ID);
int albumColumn = cursor.getColumnIndex(Albums.ALBUM);
int albumArtColumn = cursor.getColumnIndex(Albums.ALBUM_ART);
int albumKeyColumn = cursor.getColumnIndex(Albums.ALBUM_KEY);
int artistColumn = cursor.getColumnIndex(Albums.ARTIST);
int numOfSongsColumn = cursor.getColumnIndex(Albums.NUMBER_OF_SONGS);
do {
_id = cursor.getInt(_idColumn);
album = cursor.getString(albumColumn);
albumArt = cursor.getString(albumArtColumn);
albumKey = cursor.getString(albumKeyColumn);
artist = cursor.getString(artistColumn);
numOfSongs = cursor.getInt(numOfSongsColumn);
HashMap<String, String> hash = new HashMap<>();
hash.put("_id", _id + "");
hash.put("album", album);
hash.put("albumArt", albumArt);
hash.put("albumKey", albumKey);
hash.put("artist", artist);
hash.put("numOfSongs", numOfSongs + "");
albumList.add(hash);
}while (cursor.moveToNext());
}
cursor.close();
}
示例7: getAlbum
/**
* 得到原图
*/
void getAlbum() {
String[] projection = { Albums._ID, Albums.ALBUM, Albums.ALBUM_ART,
Albums.ALBUM_KEY, Albums.ARTIST, Albums.NUMBER_OF_SONGS };
Cursor cursor = cr.query(Albums.EXTERNAL_CONTENT_URI, projection, null,
null, null);
getAlbumColumnData(cursor);
}