martedì 25 maggio 2010

Generate a tone with Android

It is pretty easy play a simple tone (a beep) using Android. Two lines of code are enough:

ToneGenerator toneGen = new ToneGenerator(AudioManager.STREAM_SYSTEM, 50);
toneGen.startTone(ToneGenerator.TONE_PROP_BEEP);

Nessun commento:

Posta un commento