|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.audio.Meta
public class Meta
The Danger OS has a system of UI related audio cues. These cues are connected to various application events, and fire when used.
The Meta class can be used to replace those cues with your own custom audio.
The audio cues defined in this class are used with play(int) and
the various variants.
For example:
Meta.play(Meta.BEEP_COMMAND_ACCEPTED);
will play the BEEP_COMMAND_ACCEPTED audio cue.
You can use the Meta class to create your own sounds and replace any Meta cue. This is how Themes are done.
In this example the method useNewSwish() replaces the default Meta.LID_OPEN,
and Meta.LID_CLOSE. This is global, and will stay until a reboot, or a
call to useOldSwish().
void useNewSwish()
{
byte[] newOpen = sOpenSound; //* bytes of formatted audio data
byte[] newClose = sCloseSound; //* bytes of formatted audio data
Tone open;
Tone close;
if ((newOpen != null) && (newClose != null))
{
sSwishChanged = true;
open = new Tone(newOpen, ToneGallery.generateResourceID(), false,
false, 100, 90, ToneFilter.SOUND, ToneClass.SYSTEM,
"open!", "##UI");
if (open != null)
{
open.setRoute(Route.EXTERNAL);
sMetaOpenID = Meta.getToneFromID(Meta.LID_OPEN);
Meta.setToneToID(open, Meta.LID_OPEN);
}
else
{
// failed
}
close = new Tone(newClose, ToneGallery.generateResourceID(), false,
false, 100, 90, ToneFilter.SOUND, ToneClass.SYSTEM,
"open!", "##UI");
if (close != null)
{
close.setRoute(Route.EXTERNAL);
sMetaCloseID = Meta.getToneFromID(Meta.LID_CLOSE);
Meta.setToneToID(close, Meta.LID_CLOSE);
}
else
{
// failed
}
}
}
void useOldSwish()
{
if (sSwishChanged)
{
Meta.setToneToID(sMetaOpenID, Meta.LID_OPEN);
Meta.setToneToID(sMetaCloseID, Meta.LID_CLOSE);
sMetaOpenID = null;
sMetaCloseID = null;
}
sSwishChanged = false;
}
| Field Summary | |
|---|---|
static int |
APP_CALENDAR_EVENT
Audio cue for calendar alert. |
static int |
APP_EMAIL_RECEIVED
Audio cue for receiving an email. |
static int |
APP_MMS_RECEIVED
Audio cue for receiving an MMS. |
static int |
APP_PHONE_NEW_VOICE_MAIL
Audio cue for when the new voice mail arrives. |
static int |
APP_PHONE_RING
Audio cue for when the phone rings. |
static int |
APP_SMS_RECEIVED
Audio cue for receiving an SMS. |
static int |
APP_WAP_DONE
Audio cue for a wap page being done. |
static int |
APP_WEB_DONE
Audio cue for a web page being done. |
static int |
BATTERY_COVER_REMOVED
Audio cue for battery cover being removed. |
static int |
BATTERY_FAILURE_IMMINENT
Deprecated. |
static int |
BEEP_ACTION_FAIL
Audio cue denotes action failed. |
static int |
BEEP_ACTION_SUCCESS
Audio cue denotes action succeeds. |
static int |
BEEP_COMMAND_ACCEPTED
Audio cue denotes command accepted. |
static int |
BEEP_COMMAND_REJECTED
Audio cue denotes command reject. |
static int |
CALL_BUSY
Audio cue for phone busy tone. |
static int |
CALL_DROPPED
Audio cue for phone call dropped tone. |
static int |
CALL_ENDED
Audio cue for phone call ended tone. |
static int |
CALL_REORDER
Audio cue for phone call reordered tone. |
static int |
CALL_WAITING
Audio cue for phone call waiting tone. |
static int |
CHARGER_CONNECTED
Audio cue when a device connects to a charger. |
static int |
CHARGER_DISCONNECTED
Audio cue when a device disconnects from a charger. |
static int |
DEFAULT_BACKGROUND
Audio cue for default background tone. |
static int |
DEFAULT_FOREGROUND
Audio cue for default foreground tone. |
static int |
DELETE_ITEM
Audio cue for a item being deleted. |
static int |
DELETE_TRASH
Audio cue for a trash being deleted. |
static int |
DIALOG_OPEN
Audio cue for a dialog being opened. |
static int |
ENTER_KEYGUARD
Audio cue for device entering keyguard. |
static int |
ENTER_SUB_CHOOSER
Audio cue for opening a folder in chooser. |
static int |
FEEDBACK_AUTO_CAP
Audio cue for when the caps key is pressed twice, to denote auto cap on. |
static int |
FEEDBACK_AUTO_REPLACE
Audio cue for when a autotext event replaces text. |
static int |
FEEDBACK_BACK_BUTTON
Deprecated. Use FEEDBACK_DONE_BUTTON instead. |
static int |
FEEDBACK_CANCEL_BUTTON
Audio cue for cancel being pressed. |
static int |
FEEDBACK_DELETE_KEY_ONCE
Audio cue for keyboard delete key being pressed. |
static int |
FEEDBACK_DELETE_KEY_REPEAT
Audio cue for keyboard delete key being repeated. |
static int |
FEEDBACK_DONE_BUTTON
Audio cue for back/done being pressed. |
static int |
FEEDBACK_END_BUTTON
Audio cue for phone end being pressed. |
static int |
FEEDBACK_HEADSET_BUTTON
Audio cue for headset button being pressed. |
static int |
FEEDBACK_JUMP_BUTTON
Audio cue for jump being pressed. |
static int |
FEEDBACK_KEY_ONCE
Audio cue for keyboard keys being pressed. |
static int |
FEEDBACK_KEY_REPEAT
Audio cue for keyboard keys being repeated. |
static int |
FEEDBACK_LEFT_SHOULDER_BUTTON
Audio cue for left shoulder being pressed. |
static int |
FEEDBACK_MENU_BUTTON
Audio cue for menu being pressed. |
static int |
FEEDBACK_NETWORK_1
Audio cue for network connection at one dot. |
static int |
FEEDBACK_NETWORK_2
Audio cue for network connection at two dots. |
static int |
FEEDBACK_NETWORK_3
Audio cue for network connection at three dots. |
static int |
FEEDBACK_NETWORK_G
Audio cue for network connection at G (connected). |
static int |
FEEDBACK_NETWORK_PHONEONLY
Audio cue for network connection at phone only. |
static int |
FEEDBACK_NETWORK_X
Audio cue for network connection at X. |
static int |
FEEDBACK_PAGE_DOWN
Audio cue for page down being pressed. |
static int |
FEEDBACK_PAGE_UP
Audio cue for page up being pressed. |
static int |
FEEDBACK_POWER_SWITCH_BUTTON
Audio cue for power being pressed. |
static int |
FEEDBACK_PROFILE_VOL
Audio cue for when the Profile UI changes profiles. |
static int |
FEEDBACK_RETURN_KEY_ONCE
Audio cue for keyboard return key being pressed. |
static int |
FEEDBACK_RETURN_KEY_REPEAT
Audio cue for keyboard return key being repeated. |
static int |
FEEDBACK_RIGHT_SHOULDER_BUTTON
Audio cue for right shoulder being pressed. |
static int |
FEEDBACK_SEND_BUTTON
Audio cue for phone send being pressed. |
static int |
FEEDBACK_SPACE_KEY_ONCE
Audio cue for keyboard space key being pressed. |
static int |
FEEDBACK_SPACE_KEY_REPEAT
Audio cue for keyboard space key being repeated. |
static int |
FEEDBACK_WHEEL_BUTTON
Audio cue for wheel/trackball being pressed. |
static int |
INVALID
Invalid meta ID. |
static int |
JUMP_SHORTCUT
Audio cue for activating a new application via a shortcut. |
static int |
JUMP_TO_CHOOSER
Audio cue for closing a folder in chooser. |
static int |
LID_CLOSE
Audio cue for device screen close. |
static int |
LID_OPEN
Audio cue for device screen open. |
static int |
LOW_BATTERY
Audio cue for low power. |
static int |
LOW_BATTERY_ON_PHONE
Audio cue for low power, but only plays while on phone. |
static int |
MENU_ACTIVATION
Audio cue for a menu being displayed. |
static int |
MENU_DISMISS
Audio cue for a menu being closed. |
static int |
MENU_SHORTCUT
Audio cue for a menu keyboard shortcut being used. |
static int |
SCROLL_LIMIT
Audio cue denotes scroll limits. |
static int |
SCROLL_WHEEL_DOWN
Audio cue for scroll wheel down. |
static int |
SCROLL_WHEEL_UP
Audio cue for scroll wheel up. |
static int |
SYSTEM_BACKGROUND
Audio cue for default background tone. |
static int |
SYSTEM_FOREGROUND
Audio cue for default foreground tone. |
static int |
ZOOM_IN
Not used, but reserved. |
static int |
ZOOM_OUT
Not used, but reserved. |
static int |
ZOOM_OUT_FURTHER
Not used, but reserved. |
| Method Summary | |
|---|---|
static int |
createDefaultToneID(int klass)
Create a default toneID from a ToneClass. |
static int |
getDefaultVolume(int id)
Given a meta or tone ID, return its default volume. |
static int |
getDefaultVolume(RingToneObject ring)
Given a ringtone object, return its default volume. |
static int |
getIDFromResourceID(int metaID)
Get a ToneGallery ID, from a Meta ID. |
static Tone |
getToneFromID(int metaID)
Get a Tone from a Meta ID. |
static Tone |
getToneFromID(RingToneObject ring)
Get a Tone from a RingToneObject. |
static int |
getVolume(int id)
Given a meta or tone ID, return its volume. |
static int |
getVolume(RingToneObject ring)
Given a ringtone object, return its volume. |
static boolean |
isDone(int id)
Get status of doneness of a Meta ID or ToneGallery ID. |
static boolean |
isIDMuted(int metaID)
Return mute status of a metaID. |
static boolean |
isInitialized()
Returns true if Meta system is initialized. |
static boolean |
isInstalled(int id)
Check to see if a particular ID is installed. |
static boolean |
isInstalled(RingToneObject ring)
Check to see if a particular RingToneObject is installed. |
static boolean |
isMetaID(int metaID)
Is the ID a meta cue, or a ToneGallery ID. |
static void |
muteID(int metaID)
Mute a particular Meta ID. |
static void |
play(int id)
Load and play the toneID passed in. |
static void |
play(int id,
int volume)
Load and play the toneID passed in. |
static void |
play(int id,
int volume,
int playbackFilters)
Load and play the toneID passed in. |
static void |
play(int id,
int volume,
int playbackFilters,
int playbackClass,
boolean sync)
Load and play the toneID passed in. |
static void |
play(RingToneObject ring)
Load and play the RingToneObject passed in. |
static void |
play(RingToneObject ring,
int volume)
Load and play the RingToneObject passed in. |
static void |
play(RingToneObject ring,
int volume,
int playbackClass)
Load and play the RingToneObject passed in. |
static void |
play(RingToneObject ring,
int volume,
int playbackFilters,
int playbackClass)
Load and play the RingToneObject passed in. |
static void |
playSync(int id)
Load and play the toneID passed in. |
static void |
playSync(int id,
int volume)
Load and play the toneID passed in. |
static void |
playSync(int id,
int volume,
int playbackFilters)
Load and play the toneID passed in. |
static void |
playSync(RingToneObject ring)
Load and play the RingToneObject passed in. |
static void |
playSync(RingToneObject ring,
int volume)
Load and play the RingToneObject passed in. |
static void |
playSync(RingToneObject ring,
int volume,
int playbackClass)
Load and play the RingToneObject passed in. |
static void |
playSync(RingToneObject ring,
int volume,
int playbackFilters,
int playbackClass)
Load and play the RingToneObject passed in. |
static void |
playSyncAsBackground(int id)
Load and play the toneID passed in. |
static void |
restoreIDToDefault(int metaID)
Given a valid Meta ID cue, restore the original ToneGallery ID. |
static void |
setDoneCallbackEvent(int id,
Event done)
Set the event that is called when this meta audio is finished. |
static void |
setLoop(int id,
boolean on)
Set looping on/off for a given Meta or ToneGallery ID. |
static void |
setLoop(RingToneObject ring,
boolean on)
Set looping on/off for a given RingToneObject. |
static void |
setStoppedCallbackEvent(int id,
Event stopped)
Set the event that is called when this meta audio is stopped by stop(). |
static boolean |
setToneToID(Tone tone,
int metaID)
Change which Tone is called when a Meta ID is called with play(int, int, int, int, boolean). |
static void |
setVolume(int id,
int volume)
Given a meta or tone ID and a volume set it. |
static void |
setVolume(RingToneObject ring,
int volume)
Given a ringtone object and a volume set it. |
static void |
stop(int id)
Stop a Meta or ToneGallery ID. |
static void |
stop(RingToneObject ring)
Stop a RingToneObject. |
static void |
unmuteID(int metaID)
Unmute a particular Meta ID. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INVALID
createDefaultToneID(int)
public static final int BEEP_COMMAND_ACCEPTED
public static final int BEEP_COMMAND_REJECTED
public static final int BEEP_ACTION_SUCCESS
public static final int BEEP_ACTION_FAIL
public static final int SCROLL_LIMIT
public static final int SCROLL_WHEEL_UP
public static final int SCROLL_WHEEL_DOWN
public static final int FEEDBACK_WHEEL_BUTTON
public static final int FEEDBACK_MENU_BUTTON
public static final int FEEDBACK_JUMP_BUTTON
public static final int FEEDBACK_BACK_BUTTON
FEEDBACK_DONE_BUTTON instead.
public static final int FEEDBACK_KEY_ONCE
public static final int FEEDBACK_KEY_REPEAT
public static final int FEEDBACK_DELETE_KEY_ONCE
public static final int FEEDBACK_DELETE_KEY_REPEAT
public static final int FEEDBACK_RETURN_KEY_ONCE
public static final int FEEDBACK_RETURN_KEY_REPEAT
public static final int FEEDBACK_SPACE_KEY_ONCE
public static final int FEEDBACK_SPACE_KEY_REPEAT
public static final int FEEDBACK_DONE_BUTTON
public static final int FEEDBACK_CANCEL_BUTTON
public static final int FEEDBACK_PAGE_UP
public static final int FEEDBACK_PAGE_DOWN
public static final int FEEDBACK_AUTO_REPLACE
public static final int FEEDBACK_AUTO_CAP
public static final int FEEDBACK_PROFILE_VOL
public static final int FEEDBACK_SEND_BUTTON
public static final int FEEDBACK_END_BUTTON
public static final int FEEDBACK_LEFT_SHOULDER_BUTTON
public static final int FEEDBACK_RIGHT_SHOULDER_BUTTON
public static final int FEEDBACK_POWER_SWITCH_BUTTON
public static final int FEEDBACK_HEADSET_BUTTON
public static final int ZOOM_IN
public static final int ZOOM_OUT
public static final int ZOOM_OUT_FURTHER
public static final int ENTER_SUB_CHOOSER
public static final int JUMP_TO_CHOOSER
public static final int JUMP_SHORTCUT
public static final int CHARGER_CONNECTED
public static final int CHARGER_DISCONNECTED
public static final int LOW_BATTERY
public static final int BATTERY_FAILURE_IMMINENT
public static final int LOW_BATTERY_ON_PHONE
public static final int BATTERY_COVER_REMOVED
public static final int ENTER_KEYGUARD
public static final int LID_OPEN
public static final int LID_CLOSE
public static final int CALL_BUSY
public static final int CALL_WAITING
public static final int CALL_ENDED
public static final int CALL_DROPPED
public static final int CALL_REORDER
public static final int MENU_ACTIVATION
public static final int MENU_DISMISS
public static final int MENU_SHORTCUT
public static final int DIALOG_OPEN
public static final int DELETE_ITEM
public static final int DELETE_TRASH
public static final int FEEDBACK_NETWORK_X
public static final int FEEDBACK_NETWORK_PHONEONLY
public static final int FEEDBACK_NETWORK_1
public static final int FEEDBACK_NETWORK_2
public static final int FEEDBACK_NETWORK_3
public static final int FEEDBACK_NETWORK_G
public static final int DEFAULT_FOREGROUND
public static final int DEFAULT_BACKGROUND
public static final int SYSTEM_FOREGROUND
public static final int SYSTEM_BACKGROUND
public static final int APP_SMS_RECEIVED
public static final int APP_PHONE_RING
public static final int APP_PHONE_NEW_VOICE_MAIL
public static final int APP_MMS_RECEIVED
public static final int APP_WEB_DONE
public static final int APP_WAP_DONE
public static final int APP_EMAIL_RECEIVED
public static final int APP_CALENDAR_EVENT
| Method Detail |
|---|
public static boolean isInitialized()
public static void play(int id,
int volume,
int playbackFilters,
int playbackClass,
boolean sync)
playbackFilters - one or combined bits of ToneFilterplaybackClass - one of ToneClasssync - if true then this method is synchronous, otherwise asynchronous.volume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultid - can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.public static int createDefaultToneID(int klass)
ToneClass.
klass - one of ToneClass
play(int)public static void play(int id)
Tone.USE_DEFAULT_VOLUME
for volume, ToneFilter.ALL for filter, and Tone.USE_DEFAULT_CLASS
for class. This method is asynchronous.
id - can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.
public static void play(int id,
int volume)
ToneFilter.ALL for filter,
and Tone.USE_DEFAULT_CLASS
for class. This method is asynchronous.
volume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultid - can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.
public static void play(int id,
int volume,
int playbackFilters)
playbackFilters - one or combined bits of ToneFiltervolume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultid - can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.public static void playSync(int id)
Tone.USE_DEFAULT_VOLUME
for volume, ToneFilter.ALL for filter, and Tone.USE_DEFAULT_CLASS
for class. This method is synchronous.
id - can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.
public static void playSync(int id,
int volume)
ToneFilter.ALL for filter,
and Tone.USE_DEFAULT_CLASS
for class. This method is synchronous.
volume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultid - can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.
public static void playSync(int id,
int volume,
int playbackFilters)
ToneFilter.ALL for filter.
This method is synchronous.
playbackFilters - one or combined bits of ToneFiltervolume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultid - can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.public static void playSyncAsBackground(int id)
ToneFilter.ALL for filter.
This method is synchronous. Will play this id as a background tone which
basically means that the sound will NOT loop
id - can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.public static void play(RingToneObject ring)
RingToneObject.setFilterFlags(int). Uses Tone.USE_DEFAULT_VOLUME,
and Tone.USE_DEFAULT_CLASS for class. This method is asynchronous.
ring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.
public static void play(RingToneObject ring,
int volume)
RingToneObject.setFilterFlags(int). Uses
Tone.USE_DEFAULT_CLASS for class. This method is asynchronous.
volume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.
public static void play(RingToneObject ring,
int volume,
int playbackClass)
RingToneObject.setFilterFlags(int).
This method is asynchronous.
volume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultplaybackClass - one of ToneClassring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.
public static void play(RingToneObject ring,
int volume,
int playbackFilters,
int playbackClass)
volume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultplaybackClass - one of ToneClassplaybackFilters - one or combined bits of ToneFilterring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.public static void playSync(RingToneObject ring)
RingToneObject.setFilterFlags(int). Uses Tone.USE_DEFAULT_VOLUME,
and Tone.USE_DEFAULT_CLASS for class. This method is synchronous.
ring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.
public static void playSync(RingToneObject ring,
int volume)
RingToneObject.setFilterFlags(int). Uses
Tone.USE_DEFAULT_CLASS for class. This method is asynchronous.
volume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.
public static void playSync(RingToneObject ring,
int volume,
int playbackClass)
RingToneObject.setFilterFlags(int).
This method is asynchronous.
volume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultplaybackClass - one of ToneClassring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.
public static void playSync(RingToneObject ring,
int volume,
int playbackFilters,
int playbackClass)
volume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultplaybackClass - one of ToneClassplaybackFilters - one or combined bits of ToneFilterring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID. If id is a Meta ID, then the associated
cue will be loaded and played. If id is not a Meta, then a search of the ToneGallery
will be loaded and played. If id is not in the Meta tone list then nothing will happen.
If id is not in the ToneGallery, then a default sound will be played.public static int getVolume(int id)
id - can be a Meta ID cue, or a ToneGallery ID
public static int getVolume(RingToneObject ring)
ring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID.
public static void setVolume(int id,
int volume)
id - can be a Meta ID cue, or a ToneGallery IDvolume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for default
public static void setVolume(RingToneObject ring,
int volume)
ring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID.volume - 0 to 100, or Tone.USE_DEFAULT_VOLUME for defaultpublic static int getDefaultVolume(int id)
id - can be a Meta ID cue, or a ToneGallery ID
public static int getDefaultVolume(RingToneObject ring)
ring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID.
public static boolean isMetaID(int metaID)
metaID - can be a Meta ID cue, or a ToneGallery ID
public static void setLoop(RingToneObject ring,
boolean on)
ring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID.on - true will loop when played, false will play once
public static void setLoop(int id,
boolean on)
id - This can be a Meta ID cue, or a ToneGallery ID.on - true will loop when played, false will play oncepublic static void stop(int id)
id - This can be a Meta ID cue, or a ToneGallery ID.public static void stop(RingToneObject ring)
ring - a RingToneObject, which contains an id. This
can be a Meta ID cue, or a ToneGallery ID.
public static void setDoneCallbackEvent(int id,
Event done)
id - valid Meta ID cue, or a ToneGallery IDdone - Event will be triggered when audio finished playing
public static void setStoppedCallbackEvent(int id,
Event stopped)
id - valid Meta ID cue, or a ToneGallery IDstopped - Event will be triggered when stop(int) is calledpublic static boolean isDone(int id)
id - This can be a Meta ID cue, or a ToneGallery ID.
public static boolean setToneToID(Tone tone,
int metaID)
play(int, int, int, int, boolean).
Use restoreIDToDefault(int) to return to the original state.
tone - valid TonemetaID - valid Meta ID cue
public static void restoreIDToDefault(int metaID)
setToneToID(danger.audio.Tone, int).
metaID - valid Meta IDpublic static void muteID(int metaID)
metaID - valid Meta ID cuepublic static void unmuteID(int metaID)
metaID - valid Meta ID cuepublic static boolean isIDMuted(int metaID)
muteID(int).
metaID - valid Meta ID cue
public static int getIDFromResourceID(int metaID)
metaID - valid Meta ID cue
INVALID if metaID is not a valid
Meta ID cuepublic static boolean isInstalled(RingToneObject ring)
ring - a valid RingToneObject
public static boolean isInstalled(int id)
id - a valid Meta ID cue, or a ToneGallery ID
public static Tone getToneFromID(RingToneObject ring)
ring - a valid RingToneObject
Tone or null if not installedpublic static Tone getToneFromID(int metaID)
metaID - an ID that's either a Meta audio cue ID, or a ToneGallery ID
Tone or null if not installed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||