danger.audio
Class Meta

java.lang.Object
  extended by danger.audio.Meta


public class Meta
extends Object

The Meta class contains the ID's and methods for public access to various sounds and sequences for the Danger system. This file contains a list of all available audio events for the system. These ID's are frozen.


Field Summary
static int APP_CALENDAR_EVENT
           
static int APP_EMAIL_RECEIVED
           
static int APP_MMS_RECEIVED
           
static int APP_PHONE_NEW_VOICE_MAIL
           
static int APP_PHONE_RING
           
static int APP_SMS_RECEIVED
          application specific defaults
static int APP_WAP_DONE
           
static int APP_WEB_DONE
           
static int ATTEMPT_CALL
          Deprecated. Does not play any sound.
static int BATTERY_COVER_REMOVED
           
static int BATTERY_FAILURE_IMMINENT
           
static int BEEP_ACTION_FAIL
           
static int BEEP_ACTION_SUCCESS
           
static int BEEP_COMMAND_ACCEPTED
           
static int BEEP_COMMAND_REJECTED
           
static int BEEP_STARTUP_SOUND
          Deprecated. Does not play any sound.
static int CALL_BUSY
           
static int CALL_DROPPED
           
static int CALL_ENDED
           
static int CALL_REORDER
           
static int CALL_WAITING
           
static int CHARGER_CONNECTED
          device connections
static int CHARGER_DISCONNECTED
           
static int DEFAULT_BACKGROUND
           
static int DEFAULT_FOREGROUND
          defaults for foreground/background, system
static int DELETE_ITEM
           
static int DELETE_TRASH
           
static int DIALOG_OPEN
           
static int FEEDBACK_AUTO_CAP
           
static int FEEDBACK_AUTO_REPLACE
           
static int FEEDBACK_BACK_BUTTON
           
static int FEEDBACK_CANCEL_BUTTON
           
static int FEEDBACK_DELETE_KEY_ONCE
          delete key
static int FEEDBACK_DELETE_KEY_REPEAT
           
static int FEEDBACK_DONE_BUTTON
           
static int FEEDBACK_END_BUTTON
           
static int FEEDBACK_HEADSET_BUTTON
           
static int FEEDBACK_JUMP_BUTTON
           
static int FEEDBACK_KEY_ONCE
          all keys
static int FEEDBACK_KEY_REPEAT
           
static int FEEDBACK_LEFT_SHOULDER_BUTTON
           
static int FEEDBACK_MENU_BUTTON
           
static int FEEDBACK_NETWORK_1
           
static int FEEDBACK_NETWORK_2
           
static int FEEDBACK_NETWORK_3
           
static int FEEDBACK_NETWORK_G
           
static int FEEDBACK_NETWORK_PHONEONLY
           
static int FEEDBACK_NETWORK_X
          network connection feedback
static int FEEDBACK_PAGE_DOWN
           
static int FEEDBACK_PAGE_UP
           
static int FEEDBACK_POWER_SWITCH_BUTTON
           
static int FEEDBACK_PROFILE_VOL
           
static int FEEDBACK_RETURN_KEY_ONCE
          return key
static int FEEDBACK_RETURN_KEY_REPEAT
           
static int FEEDBACK_RIGHT_SHOULDER_BUTTON
           
static int FEEDBACK_SEND_BUTTON
           
static int FEEDBACK_SPACE_KEY_ONCE
          space key
static int FEEDBACK_SPACE_KEY_REPEAT
           
static int FEEDBACK_WHEEL_BUTTON
           
static int HEADSET_CONNECTED
          Deprecated. Does not play any sound.
static int HEADSET_DISCONNECTED
          Deprecated. Does not play any sound.
static int INVALID
          public meta ID's.
static int JUMP_SHORTCUT
          jump shortcut to active new app
static int JUMP_TO_CHOOSER
           
static int LID_CLOSE
           
static int LID_OPEN
           
static int LOW_BATTERY
          in 10 seconds, Dave, I will have no power.
static int LOW_BATTERY_ON_PHONE
           
static int MENU_ACTIVATION
           
static int MENU_DISMISS
           
static int MENU_SHORTCUT
          keyboard menu shortcut
static int SCROLL_LIMIT
           
static int SCROLL_WHEEL_DOWN
           
static int SCROLL_WHEEL_UP
           
static int SYSTEM_BACKGROUND
           
static int SYSTEM_FOREGROUND
           
static int USB_CONNECTED
          Deprecated. Does not play any sound.
static int USB_DISCONNECTED
          Deprecated. Does not play any sound.
static int ZOOM_IN
           
static int ZOOM_OUT
           
static int ZOOM_OUT_FURTHER
           
 
Constructor Summary
Meta()
           
 
Method Summary
static int createDefaultToneID(int klass)
          Return a default Tone from a ToneClass.
static void displayState()
           
static int getDefaultVolume(int id)
          Given a ID, return its default volume OS 2.3
static int getDefaultVolume(RingToneObject ring)
          Given a ringtone object, return its default volume OS 2.3
static int getIDFromResourceID(int metaID)
          Given a meta ID, return the associated ToneGalleryList resource ID.
static Tone getToneFromID(int metaID)
          Given an meta/tone ID, return the tone associated with it Returns null if not installed/available.
static Tone getToneFromID(RingToneObject ring)
          Given a RingToneObject, return the Tone associated with it.
static int getVolume(int id)
          Given a ID, return its volume
static int getVolume(RingToneObject ring)
          Given a ringtone object, return its volume
static void initialize()
           
static boolean isDone(int id)
           
static boolean isIDMuted(int metaID)
          Return true or false if a particular metaID is already muted
static boolean isInitialized()
          Returns true if initialize() has been called
static boolean isInstalled(int id)
           
static boolean isInstalled(RingToneObject ring)
           
static boolean isMetaID(int metaID)
          Given a potential meta ID, return true/false if it actaully is or not
static void muteID(int metaID)
          Mute a particular Meta ID.
static void play(int id)
          loads a default meta sequence or sound and plays using its class volume
static void play(int id, int volume)
          loads a default meta sequence or sound and plays Pass in Tone.USE_DEFAULT_VOLUME in volume to use the default volume of this tone.
static void play(int id, int volume, int playbackFilters)
          loads a default meta sequence or sound and plays.
static void play(int id, int volume, int playbackFilters, int playbackClass, boolean sync)
          loads a default meta sequence or sound and plays.
static void play(RingToneObject ring)
          loads a default meta sequence or sound and plays using its class volume OS 3.0
static void play(RingToneObject ring, int volume)
          loads a default meta sequence or sound and plays.
static void play(RingToneObject ring, int volume, int playbackClass)
           
static void play(RingToneObject ring, int volume, int playbackFilters, int playbackClass)
           
static void playSync(int id)
          loads a default meta sequence or sound using its class volume, plays, and returns when loaded and started.
static void playSync(int id, int volume)
          loads a default meta sequence or sound, plays, and returns when loaded and started.
static void playSync(int id, int volume, int playbackFilters)
          loads a default meta sequence or sound, plays, and returns when loaded and started.
static void playSync(RingToneObject ring)
          loads a default meta sequence or sound using its class volume, plays, and returns when loaded and started.
static void playSync(RingToneObject ring, int volume)
          loads a default meta sequence or sound, plays, and returns when loaded and started.
static void playSync(RingToneObject ring, int volume, int playbackClass)
           
static void playSync(RingToneObject ring, int volume, int playbackFilters, int playbackClass)
           
static void restoreIDToDefault(int metaID)
          Given a meta ID, restore the ToneGalleryList resource ID connection to its default state.
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)
          Given a ID, set looping on/off
static void setLoop(RingToneObject ring, boolean on)
          Given a RingToneObject, set looping on/off
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)
          Given a Tone and a meta ID, change the default to use this new passed in Tone.
static void setVolume(int id, int volume)
          Given a ID and a volume set it OS 2.3
static void setVolume(RingToneObject ring, int volume)
          Given a ringtone object, return its volume OS 2.3
static void stop(int id)
          stop a meta sequence, or sound from id
static void stop(RingToneObject ring)
          stop a meta sequence, or sound from RingToneObject
static void stopAll()
          shutdown all meta playback objects
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

INVALID

public static final int INVALID
public meta ID's. Default UI meta sounds or meta sequences. Use these with Meta.play()

See Also:
Constant Field Values

BEEP_COMMAND_ACCEPTED

public static final int BEEP_COMMAND_ACCEPTED
See Also:
Constant Field Values

BEEP_COMMAND_REJECTED

public static final int BEEP_COMMAND_REJECTED
See Also:
Constant Field Values

BEEP_ACTION_SUCCESS

public static final int BEEP_ACTION_SUCCESS
See Also:
Constant Field Values

BEEP_ACTION_FAIL

public static final int BEEP_ACTION_FAIL
See Also:
Constant Field Values

BEEP_STARTUP_SOUND

public static final int BEEP_STARTUP_SOUND
Deprecated. Does not play any sound.
See Also:
Constant Field Values

SCROLL_LIMIT

public static final int SCROLL_LIMIT
See Also:
Constant Field Values

SCROLL_WHEEL_UP

public static final int SCROLL_WHEEL_UP
See Also:
Constant Field Values

SCROLL_WHEEL_DOWN

public static final int SCROLL_WHEEL_DOWN
See Also:
Constant Field Values

FEEDBACK_WHEEL_BUTTON

public static final int FEEDBACK_WHEEL_BUTTON
See Also:
Constant Field Values

FEEDBACK_MENU_BUTTON

public static final int FEEDBACK_MENU_BUTTON
See Also:
Constant Field Values

FEEDBACK_JUMP_BUTTON

public static final int FEEDBACK_JUMP_BUTTON
See Also:
Constant Field Values

FEEDBACK_BACK_BUTTON

public static final int FEEDBACK_BACK_BUTTON
See Also:
Constant Field Values

FEEDBACK_KEY_ONCE

public static final int FEEDBACK_KEY_ONCE
all keys

See Also:
Constant Field Values

FEEDBACK_KEY_REPEAT

public static final int FEEDBACK_KEY_REPEAT
See Also:
Constant Field Values

FEEDBACK_DELETE_KEY_ONCE

public static final int FEEDBACK_DELETE_KEY_ONCE
delete key

See Also:
Constant Field Values

FEEDBACK_DELETE_KEY_REPEAT

public static final int FEEDBACK_DELETE_KEY_REPEAT
See Also:
Constant Field Values

FEEDBACK_RETURN_KEY_ONCE

public static final int FEEDBACK_RETURN_KEY_ONCE
return key

See Also:
Constant Field Values

FEEDBACK_RETURN_KEY_REPEAT

public static final int FEEDBACK_RETURN_KEY_REPEAT
See Also:
Constant Field Values

FEEDBACK_SPACE_KEY_ONCE

public static final int FEEDBACK_SPACE_KEY_ONCE
space key

See Also:
Constant Field Values

FEEDBACK_SPACE_KEY_REPEAT

public static final int FEEDBACK_SPACE_KEY_REPEAT
See Also:
Constant Field Values

FEEDBACK_DONE_BUTTON

public static final int FEEDBACK_DONE_BUTTON
See Also:
Constant Field Values

FEEDBACK_CANCEL_BUTTON

public static final int FEEDBACK_CANCEL_BUTTON
See Also:
Constant Field Values

FEEDBACK_PAGE_UP

public static final int FEEDBACK_PAGE_UP
See Also:
Constant Field Values

FEEDBACK_PAGE_DOWN

public static final int FEEDBACK_PAGE_DOWN
See Also:
Constant Field Values

FEEDBACK_AUTO_REPLACE

public static final int FEEDBACK_AUTO_REPLACE
See Also:
Constant Field Values

FEEDBACK_AUTO_CAP

public static final int FEEDBACK_AUTO_CAP
See Also:
Constant Field Values

FEEDBACK_PROFILE_VOL

public static final int FEEDBACK_PROFILE_VOL
See Also:
Constant Field Values

FEEDBACK_SEND_BUTTON

public static final int FEEDBACK_SEND_BUTTON
See Also:
Constant Field Values

FEEDBACK_END_BUTTON

public static final int FEEDBACK_END_BUTTON
See Also:
Constant Field Values

FEEDBACK_LEFT_SHOULDER_BUTTON

public static final int FEEDBACK_LEFT_SHOULDER_BUTTON
See Also:
Constant Field Values

FEEDBACK_RIGHT_SHOULDER_BUTTON

public static final int FEEDBACK_RIGHT_SHOULDER_BUTTON
See Also:
Constant Field Values

FEEDBACK_POWER_SWITCH_BUTTON

public static final int FEEDBACK_POWER_SWITCH_BUTTON
See Also:
Constant Field Values

FEEDBACK_HEADSET_BUTTON

public static final int FEEDBACK_HEADSET_BUTTON
See Also:
Constant Field Values

ZOOM_IN

public static final int ZOOM_IN
See Also:
Constant Field Values

ZOOM_OUT

public static final int ZOOM_OUT
See Also:
Constant Field Values

ZOOM_OUT_FURTHER

public static final int ZOOM_OUT_FURTHER
See Also:
Constant Field Values

JUMP_TO_CHOOSER

public static final int JUMP_TO_CHOOSER
See Also:
Constant Field Values

JUMP_SHORTCUT

public static final int JUMP_SHORTCUT
jump shortcut to active new app

See Also:
Constant Field Values

CHARGER_CONNECTED

public static final int CHARGER_CONNECTED
device connections

See Also:
Constant Field Values

CHARGER_DISCONNECTED

public static final int CHARGER_DISCONNECTED
See Also:
Constant Field Values

HEADSET_CONNECTED

public static final int HEADSET_CONNECTED
Deprecated. Does not play any sound.
See Also:
Constant Field Values

HEADSET_DISCONNECTED

public static final int HEADSET_DISCONNECTED
Deprecated. Does not play any sound.
See Also:
Constant Field Values

USB_CONNECTED

public static final int USB_CONNECTED
Deprecated. Does not play any sound.
See Also:
Constant Field Values

USB_DISCONNECTED

public static final int USB_DISCONNECTED
Deprecated. Does not play any sound.
See Also:
Constant Field Values

LOW_BATTERY

public static final int LOW_BATTERY
in 10 seconds, Dave, I will have no power.

See Also:
Constant Field Values

BATTERY_FAILURE_IMMINENT

public static final int BATTERY_FAILURE_IMMINENT
See Also:
Constant Field Values

LOW_BATTERY_ON_PHONE

public static final int LOW_BATTERY_ON_PHONE
See Also:
Constant Field Values

BATTERY_COVER_REMOVED

public static final int BATTERY_COVER_REMOVED
See Also:
Constant Field Values

LID_OPEN

public static final int LID_OPEN
See Also:
Constant Field Values

LID_CLOSE

public static final int LID_CLOSE
See Also:
Constant Field Values

CALL_BUSY

public static final int CALL_BUSY
See Also:
Constant Field Values

CALL_WAITING

public static final int CALL_WAITING
See Also:
Constant Field Values

CALL_ENDED

public static final int CALL_ENDED
See Also:
Constant Field Values

ATTEMPT_CALL

public static final int ATTEMPT_CALL
Deprecated. Does not play any sound.
See Also:
Constant Field Values

CALL_DROPPED

public static final int CALL_DROPPED
See Also:
Constant Field Values

CALL_REORDER

public static final int CALL_REORDER
See Also:
Constant Field Values

MENU_ACTIVATION

public static final int MENU_ACTIVATION
See Also:
Constant Field Values

MENU_DISMISS

public static final int MENU_DISMISS
See Also:
Constant Field Values

MENU_SHORTCUT

public static final int MENU_SHORTCUT
keyboard menu shortcut

See Also:
Constant Field Values

DIALOG_OPEN

public static final int DIALOG_OPEN
See Also:
Constant Field Values

DELETE_ITEM

public static final int DELETE_ITEM
See Also:
Constant Field Values

DELETE_TRASH

public static final int DELETE_TRASH
See Also:
Constant Field Values

FEEDBACK_NETWORK_X

public static final int FEEDBACK_NETWORK_X
network connection feedback

See Also:
Constant Field Values

FEEDBACK_NETWORK_PHONEONLY

public static final int FEEDBACK_NETWORK_PHONEONLY
See Also:
Constant Field Values

FEEDBACK_NETWORK_1

public static final int FEEDBACK_NETWORK_1
See Also:
Constant Field Values

FEEDBACK_NETWORK_2

public static final int FEEDBACK_NETWORK_2
See Also:
Constant Field Values

FEEDBACK_NETWORK_3

public static final int FEEDBACK_NETWORK_3
See Also:
Constant Field Values

FEEDBACK_NETWORK_G

public static final int FEEDBACK_NETWORK_G
See Also:
Constant Field Values

DEFAULT_FOREGROUND

public static final int DEFAULT_FOREGROUND
defaults for foreground/background, system

See Also:
Constant Field Values

DEFAULT_BACKGROUND

public static final int DEFAULT_BACKGROUND
See Also:
Constant Field Values

SYSTEM_FOREGROUND

public static final int SYSTEM_FOREGROUND
See Also:
Constant Field Values

SYSTEM_BACKGROUND

public static final int SYSTEM_BACKGROUND
See Also:
Constant Field Values

APP_SMS_RECEIVED

public static final int APP_SMS_RECEIVED
application specific defaults

See Also:
Constant Field Values

APP_PHONE_RING

public static final int APP_PHONE_RING
See Also:
Constant Field Values

APP_PHONE_NEW_VOICE_MAIL

public static final int APP_PHONE_NEW_VOICE_MAIL
See Also:
Constant Field Values

APP_MMS_RECEIVED

public static final int APP_MMS_RECEIVED
See Also:
Constant Field Values

APP_WEB_DONE

public static final int APP_WEB_DONE
See Also:
Constant Field Values

APP_WAP_DONE

public static final int APP_WAP_DONE
See Also:
Constant Field Values

APP_EMAIL_RECEIVED

public static final int APP_EMAIL_RECEIVED
See Also:
Constant Field Values

APP_CALENDAR_EVENT

public static final int APP_CALENDAR_EVENT
See Also:
Constant Field Values
Constructor Detail

Meta

public Meta()
Method Detail

initialize

public static void initialize()

isInitialized

public static boolean isInitialized()
Returns true if initialize() has been called


displayState

public static void displayState()

play

public static void play(int id,
                        int volume,
                        int playbackFilters,
                        int playbackClass,
                        boolean sync)
loads a default meta sequence or sound and plays. id can be a Meta ID, or a ToneGallery ID. If sync is false, then this will spin a new thread to load, thus is asynchronous. If sync is true, then will return only when loaded and started. If id is a Meta ID, then the assoicated sound/sequence 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. Pass in Tone.USE_DEFAULT_VOLUME in volume to use the default volume of this tone. Pass in Tone.USE_DEFAULT_CLASS in playbackClass to use default class.


createDefaultToneID

public static int createDefaultToneID(int klass)
Return a default Tone from a ToneClass.


play

public static void play(int id)
loads a default meta sequence or sound and plays using its class volume


play

public static void play(int id,
                        int volume)
loads a default meta sequence or sound and plays Pass in Tone.USE_DEFAULT_VOLUME in volume to use the default volume of this tone.


play

public static void play(int id,
                        int volume,
                        int playbackFilters)
loads a default meta sequence or sound and plays. This will spin a new thread to load, thus is asynchronous. id can be a Meta ID, or a ToneGallery ID. If id is a Meta ID, then the assoicated sound/sequence 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. Pass in Tone.USE_DEFAULT_VOLUME in volume to use the default volume of this tone.


playSync

public static void playSync(int id)
loads a default meta sequence or sound using its class volume, plays, and returns when loaded and started.


playSync

public static void playSync(int id,
                            int volume)
loads a default meta sequence or sound, plays, and returns when loaded and started.


playSync

public static void playSync(int id,
                            int volume,
                            int playbackFilters)
loads a default meta sequence or sound, plays, and returns when loaded and started. id can be a Meta ID, or a ToneGallery ID. If id is a Meta ID, then the assoicated sound/sequence 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. Pass in Tone.USE_DEFAULT_VOLUME in volume to use the default volume of this tone. OS 3.0


play

public static void play(RingToneObject ring)
loads a default meta sequence or sound and plays using its class volume OS 3.0


play

public static void play(RingToneObject ring,
                        int volume)
loads a default meta sequence or sound and plays. If volume is Tone.USE_DEFAULT_VOLUME then the default volume will be used, otherwise the new volume will be used.


play

public static void play(RingToneObject ring,
                        int volume,
                        int playbackClass)

play

public static void play(RingToneObject ring,
                        int volume,
                        int playbackFilters,
                        int playbackClass)

playSync

public static void playSync(RingToneObject ring)
loads a default meta sequence or sound using its class volume, plays, and returns when loaded and started. OS 3.0


playSync

public static void playSync(RingToneObject ring,
                            int volume)
loads a default meta sequence or sound, plays, and returns when loaded and started. If volume is Tone.USE_DEFAULT_VOLUME then the default volume will be used, otherwise the new volume will be used. OS 3.0


playSync

public static void playSync(RingToneObject ring,
                            int volume,
                            int playbackClass)

playSync

public static void playSync(RingToneObject ring,
                            int volume,
                            int playbackFilters,
                            int playbackClass)

getVolume

public static int getVolume(int id)
Given a ID, return its volume


getVolume

public static int getVolume(RingToneObject ring)
Given a ringtone object, return its volume


setVolume

public static void setVolume(int id,
                             int volume)
Given a ID and a volume set it OS 2.3


setVolume

public static void setVolume(RingToneObject ring,
                             int volume)
Given a ringtone object, return its volume OS 2.3


getDefaultVolume

public static int getDefaultVolume(int id)
Given a ID, return its default volume OS 2.3


getDefaultVolume

public static int getDefaultVolume(RingToneObject ring)
Given a ringtone object, return its default volume OS 2.3


isMetaID

public static boolean isMetaID(int metaID)
Given a potential meta ID, return true/false if it actaully is or not


setLoop

public static void setLoop(RingToneObject ring,
                           boolean on)
Given a RingToneObject, set looping on/off


setLoop

public static void setLoop(int id,
                           boolean on)
Given a ID, set looping on/off


stop

public static void stop(int id)
stop a meta sequence, or sound from id


stop

public static void stop(RingToneObject ring)
stop a meta sequence, or sound from RingToneObject


setDoneCallbackEvent

public static void setDoneCallbackEvent(int id,
                                        Event done)
Set the event that is called when this meta audio is finished. OS 2.5


setStoppedCallbackEvent

public static void setStoppedCallbackEvent(int id,
                                           Event stopped)
Set the event that is called when this meta audio is stopped by stop(). OS 2.5


isDone

public static boolean isDone(int id)

setToneToID

public static boolean setToneToID(Tone tone,
                                  int metaID)
Given a Tone and a meta ID, change the default to use this new passed in Tone. Returns false if failure, otherwise true.


restoreIDToDefault

public static void restoreIDToDefault(int metaID)
Given a meta ID, restore the ToneGalleryList resource ID connection to its default state.


muteID

public static void muteID(int metaID)
Mute a particular Meta ID. System wide.


unmuteID

public static void unmuteID(int metaID)
Unmute a particular Meta ID. System wide.


isIDMuted

public static boolean isIDMuted(int metaID)
Return true or false if a particular metaID is already muted


getIDFromResourceID

public static int getIDFromResourceID(int metaID)
Given a meta ID, return the associated ToneGalleryList resource ID.


isInstalled

public static boolean isInstalled(RingToneObject ring)

isInstalled

public static boolean isInstalled(int id)

getToneFromID

public static Tone getToneFromID(RingToneObject ring)
Given a RingToneObject, return the Tone associated with it. Returns null if not installed/available.


getToneFromID

public static Tone getToneFromID(int metaID)
Given an meta/tone ID, return the tone associated with it Returns null if not installed/available.


stopAll

public static void stopAll()
shutdown all meta playback objects