public static class AudioScanner.AudioItem
extends java.lang.Object
如果默认的 AudioScanner.AudioItem
无法满足你的需求,可以创建一个自定义的实体类型,然后使用自定义的
AudioScanner.Converter
将音频文件数据转换成自定义的实体对象即可。创建自定义
AudioScanner.Converter
非常简单,具体请参考 AudioScanner.AudioItemConverter
类的源码。
构造器和说明 |
---|
AudioItem(long id,
java.lang.String displayName,
java.lang.String title,
java.lang.String artist,
int artistId,
java.lang.String album,
int albumId,
java.lang.String mimeType,
java.lang.String uri,
long duration,
int dateAdded,
int dateModified,
int size,
int track,
int year,
boolean alarm,
boolean audioBook,
boolean notification,
boolean podcast,
boolean ringtone) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getAlbum() |
int |
getAlbumId() |
java.lang.String |
getArtist() |
int |
getArtistId() |
int |
getDateAdded() |
int |
getDateModified() |
java.lang.String |
getDisplayName() |
long |
getDuration() |
long |
getId() |
java.lang.String |
getMimeType() |
int |
getSize() |
java.lang.String |
getTitle() |
int |
getTrack() |
java.lang.String |
getUri() |
int |
getYear() |
int |
hashCode() |
boolean |
isAlarm() |
boolean |
isAudioBook() |
boolean |
isNotification() |
boolean |
isPodcast() |
boolean |
isRingtone() |
void |
setAlarm(boolean alarm) |
void |
setAlbum(java.lang.String album) |
void |
setAlbumId(int albumId) |
void |
setArtist(java.lang.String artist) |
void |
setArtistId(int artistId) |
void |
setAudioBook(boolean audioBook) |
void |
setDateAdded(int dateAdded) |
void |
setDateModified(int dateModified) |
void |
setDisplayName(java.lang.String displayName) |
void |
setDuration(long duration) |
void |
setId(long id) |
void |
setMimeType(java.lang.String mimeType) |
void |
setNotification(boolean notification) |
void |
setPodcast(boolean podcast) |
void |
setRingtone(boolean ringtone) |
void |
setSize(int size) |
void |
setTitle(java.lang.String title) |
void |
setTrack(int track) |
void |
setUri(java.lang.String uri) |
void |
setYear(int year) |
java.lang.String |
toString() |
public AudioItem(long id, java.lang.String displayName, java.lang.String title, java.lang.String artist, int artistId, java.lang.String album, int albumId, java.lang.String mimeType, java.lang.String uri, long duration, int dateAdded, int dateModified, int size, int track, int year, boolean alarm, boolean audioBook, boolean notification, boolean podcast, boolean ringtone)
public long getId()
public void setId(long id)
public java.lang.String getDisplayName()
public void setDisplayName(java.lang.String displayName)
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
public java.lang.String getArtist()
public void setArtist(java.lang.String artist)
public int getArtistId()
public void setArtistId(int artistId)
public java.lang.String getAlbum()
public void setAlbum(java.lang.String album)
public int getAlbumId()
public void setAlbumId(int albumId)
public java.lang.String getMimeType()
public void setMimeType(java.lang.String mimeType)
public java.lang.String getUri()
public void setUri(java.lang.String uri)
public long getDuration()
public void setDuration(long duration)
public int getDateAdded()
public void setDateAdded(int dateAdded)
public int getDateModified()
public void setDateModified(int dateModified)
public int getSize()
public void setSize(int size)
public int getTrack()
public void setTrack(int track)
public int getYear()
public void setYear(int year)
public boolean isAlarm()
public void setAlarm(boolean alarm)
public boolean isAudioBook()
public void setAudioBook(boolean audioBook)
public boolean isNotification()
public void setNotification(boolean notification)
public boolean isPodcast()
public void setPodcast(boolean podcast)
public boolean isRingtone()
public void setRingtone(boolean ringtone)
public boolean equals(java.lang.Object o)
equals
在类中 java.lang.Object
public int hashCode()
hashCode
在类中 java.lang.Object
@NonNull public java.lang.String toString()
toString
在类中 java.lang.Object