How do I access Android’s default beep sound?

… use the default android beep sound (like when you adjust the
ringer volume) …

On my Cyanogen 7 Nexus One and my old stock T-Mobile Pulse Mini (the latter from memory), as far as I can hear, this is is exactly the default beep sound on volume change:

     final ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 100);
     tg.startTone(ToneGenerator.TONE_PROP_BEEP);

You seem to be asking for an alternative to ToneGenerator, but I think it gives you exactly what you want in two lines.

Here are some other likely ToneGenerator sounds I tried that were not a match (the first two might be useful as alternates to the volume beep):

     // Double beeps:     tg.startTone(ToneGenerator.TONE_PROP_ACK);
     // Double beeps:     tg.startTone(ToneGenerator.TONE_PROP_BEEP2);
     // Sounds all wrong: tg.startTone(ToneGenerator.TONE_CDMA_KEYPAD_VOLUME_KEY_LITE);

Leave a Comment