|
WIMM Labs |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wimm.framework.os.Beeper
public final class Beeper
Classes for working with piezo speaker (beeper).
Nested Class Summary | |
---|---|
static class |
Beeper.Beep
Describes a single beep. |
static class |
Beeper.Sequence
Describes a sequence of beeps and breaks (pauses). |
Constructor Summary | |
---|---|
Beeper(Context context)
Default constructor. |
Method Summary | |
---|---|
void |
beep()
Beeps the piezo using the default duration and pitch. |
void |
beep(Beeper.Beep beep)
Beeps the piezo using the provided Beeper.Beep . |
void |
beep(Beeper.Sequence beepSequence)
Beeps the piezo using the provided Beeper.Sequence . |
void |
beep(int duration)
Beeps the piezo using the provided duration and the default pitch. |
void |
beep(int duration,
int pitch)
Beeps the piezo using the provided duration and pitch . |
void |
cancel()
Stops the current beep sequence. |
boolean |
hasBeeper()
Checks whether the hardware has a piezo speaker. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Beeper(Context context)
Method Detail |
---|
public boolean hasBeeper()
true
if a piezo speaker is present, otherwise false
.public void beep()
public void beep(int duration)
duration
and the default pitch.
duration
- The length of the beep in milliseconds. Values range from 0 to 5000.public void beep(int duration, int pitch)
duration
and pitch
.
duration
- The length of the beep in milliseconds. Values range from 0 to 5000.pitch
- The tone of the beep. Values range from 0 to 255. Low=0, High=255.public void beep(Beeper.Beep beep)
Beeper.Beep
.
beep
- The Beeper.Beep
.public void beep(Beeper.Sequence beepSequence)
Beeper.Sequence
.
beepSequence
- The Beeper.Sequence
.public void cancel()
|
WIMM Labs |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |