public final class RadioMetadata extends Object implements Parcelable
Modifier and Type | Class and Description |
---|---|
static class |
RadioMetadata.Builder
Use to build RadioMetadata objects.
|
static class |
RadioMetadata.Clock
Provides a Clock that can be used to describe time as provided by the Radio.
|
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<RadioMetadata> |
CREATOR |
static String |
METADATA_KEY_ALBUM
The album name.
|
static String |
METADATA_KEY_ART
The artwork for the song/album
Bitmap . |
static String |
METADATA_KEY_ARTIST
The artist name.
|
static String |
METADATA_KEY_CLOCK
The clock.
|
static String |
METADATA_KEY_GENRE
The music genre.
|
static String |
METADATA_KEY_ICON
The radio station icon
Bitmap . |
static String |
METADATA_KEY_RBDS_PTY
The RBDS PTY.
|
static String |
METADATA_KEY_RDS_PI
The RDS Program Information.
|
static String |
METADATA_KEY_RDS_PS
The RDS Program Service.
|
static String |
METADATA_KEY_RDS_PTY
The RDS PTY.
|
static String |
METADATA_KEY_RDS_RT
The RBDS Radio Text.
|
static String |
METADATA_KEY_TITLE
The song title.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(String key)
Returns
true if the given key is contained in the meta data |
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
Bitmap |
getBitmap(String key)
Returns a
Bitmap for the given key or null if the key is not found in the meta data. |
RadioMetadata.Clock |
getClock(String key) |
int |
getInt(String key)
Returns the value associated with the given key,
or 0 if the key is not found in the meta data.
|
static String |
getKeyFromNativeKey(int nativeKey)
Helper for getting the String key used by
RadioMetadata from the
corrsponding native integer key. |
String |
getString(String key)
Returns the text value associated with the given key as a String, or null
if the key is not found in the meta data.
|
Set<String> |
keySet()
Returns a Set containing the Strings used as keys in this meta data.
|
int |
size()
Returns the number of fields in this meta data.
|
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public static final String METADATA_KEY_RDS_PI
public static final String METADATA_KEY_RDS_PS
public static final String METADATA_KEY_RDS_PTY
public static final String METADATA_KEY_RBDS_PTY
public static final String METADATA_KEY_RDS_RT
public static final String METADATA_KEY_TITLE
public static final String METADATA_KEY_ARTIST
public static final String METADATA_KEY_ALBUM
public static final String METADATA_KEY_GENRE
public static final String METADATA_KEY_ICON
Bitmap
.public static final String METADATA_KEY_ART
Bitmap
.public static final String METADATA_KEY_CLOCK
public static final Parcelable.Creator<RadioMetadata> CREATOR
public boolean containsKey(String key)
true
if the given key is contained in the meta datakey
- a String keytrue
if the key exists in this meta data, false
otherwisepublic String getString(String key)
key
- The key the value is stored underpublic int getInt(String key)
key
- The key the value is stored underpublic Bitmap getBitmap(String key)
Bitmap
for the given key or null if the key is not found in the meta data.key
- The key the value is stored underBitmap
or nullpublic RadioMetadata.Clock getClock(String key)
public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public int size()
public Set<String> keySet()
public static String getKeyFromNativeKey(int nativeKey)
RadioMetadata
from the
corrsponding native integer key.editorKey
- The key used by the editor