|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.app.Listener
danger.ui.View
danger.ui.Container
danger.ui.Window
danger.ui.DialogWindow
danger.ui.AudioRecordWindow
public class AudioRecordWindow
Window used to record audio.
You do not instantiate an AudioRecordWindow directly. Instead, use
create(danger.app.Event, danger.app.Event, boolean). Once the recording is finished, call
getRingToneObject() to get the audio.

| Field Summary |
|---|
| Fields inherited from class danger.ui.Window |
|---|
mBusyPaintCount, mDefaultListener, STATE_AUTO_HIDE_IF_IDLE, STATE_DROP_ORPHANED_EVENTS, STATE_FULLSCREEN, STATE_UNUSED1 |
| Method Summary | |
|---|---|
static AudioRecordWindow |
create(Event doneEvent,
Event cancelEvent,
boolean immediate)
Create an AudioRecordWindow. |
boolean |
eventWidgetUp(int w,
Event e)
Handle the release of a device widget |
RingToneObject |
getRingToneObject()
Get the audio that was recorded. |
boolean |
isRecording()
Returns true if the record process is currently active |
void |
onDecoded()
This method is called when this view has been completely decoded from a dialog or screen resource. |
protected void |
onHide()
This method is called when this view is hidden, via the method View.hide(). |
protected void |
onShow()
This method is called when this view is shown, via the method View.show(). |
boolean |
receiveEvent(Event e)
Entry point for event processing. |
void |
setRecordFormat(int format)
Set the audio format this AudioRecordWindow will use. |
void |
setRecordSampleRate(int sampleRate)
Set the sample rate this AudioRecordWindow will use. |
boolean |
wasRecording()
Returns true if the user at least tried to record |
| Methods inherited from class danger.app.Listener |
|---|
cancelEvents, childEventPump, childEventPumpDone, eventProblem, isDispatchingThread, sendEvent, sendEvent, sendEvent, sendEvent, sendEvent, sendLowPriorityEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static AudioRecordWindow create(Event doneEvent,
Event cancelEvent,
boolean immediate)
doneEvent - event to send when the user is done recording audiocancelEvent - event to send if the user cancels the operationimmediate - if true, recording starts immediately; if false,
recording does not start until the user presses the record button.
Default values for record format = WAV_IMA_ADPCM, sample rate = 8000.
See setRecordFormat(int) and setRecordSampleRate(int) to set other values.public void onDecoded()
View
onDecoded in class Viewprotected void onShow()
ViewView.show(). It is called as the very last thing done by that method, and
it is only ever called if the view was not already visible.
Overriding this method is the recommended way to get special
behavior when a view gets shown.
The implementation in this class does nothin.
onShow in class Viewprotected void onHide()
ViewView.hide(). It is called as the very last thing done by that
method, and it is only ever called if the view was not already
hidden. Overriding this method is the recommended way to get special
behavior when a view gets hidden .
The implementation in this class does nothin.
onHide in class Viewpublic boolean receiveEvent(Event e)
ListenerDispatcher when it reads an Event in its queue
that is targetted at this instance. The default behavior is to
do nothing and return false. Subclasses are expected
to override this method to do something more useful.
receiveEvent in class DialogWindowe - non-null; the event to process
true) or not (false) this
method actually handled the event to completionListener.receiveEvent(danger.app.Event)
public boolean eventWidgetUp(int w,
Event e)
Container
eventWidgetUp in class DialogWindoww - the widget that went down
View.eventWidgetUp(int, danger.app.Event)public void setRecordFormat(int format)
audio - format to use for recording;
currently supports two formats:
Format.RecordType.WAV
Format.RecordType.WAV_IMA_ADPCMpublic void setRecordSampleRate(int sampleRate)
sampleRate - sample rate to use for recording.
Must be between 8000 and 44100; if not, the default
sample rate is used (8000).public RingToneObject getRingToneObject()
public boolean isRecording()
public boolean wasRecording()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||