Example usage for android.media ToneGenerator TONE_CDMA_ALERT_CALL_GUARD

List of usage examples for android.media ToneGenerator TONE_CDMA_ALERT_CALL_GUARD

Introduction

In this page you can find the example usage for android.media ToneGenerator TONE_CDMA_ALERT_CALL_GUARD.

Prototype

int TONE_CDMA_ALERT_CALL_GUARD

To view the source code for android.media ToneGenerator TONE_CDMA_ALERT_CALL_GUARD.

Click Source Link

Document

CDMA ALERT CALL GUARD tone: {1319Hz 125ms ON, 125ms OFF} 3 times

Usage

From source file:com.marianhello.bgloc.AbstractLocationProvider.java

/**
 * Plays debug sound//from  ww  w.j  ava 2  s. c o m
 * @param name tone
 */
protected void startTone(Tone name) {
    if (toneGenerator == null)
        return;

    int tone = 0;
    int duration = 1000;

    switch (name) {
    case BEEP:
        tone = ToneGenerator.TONE_PROP_BEEP;
        break;
    case BEEP_BEEP_BEEP:
        tone = ToneGenerator.TONE_CDMA_CONFIRM;
        break;
    case LONG_BEEP:
        tone = ToneGenerator.TONE_CDMA_ABBR_ALERT;
        break;
    case DOODLY_DOO:
        tone = ToneGenerator.TONE_CDMA_ALERT_NETWORK_LITE;
        break;
    case CHIRP_CHIRP_CHIRP:
        tone = ToneGenerator.TONE_CDMA_ALERT_CALL_GUARD;
        break;
    case DIALTONE:
        tone = ToneGenerator.TONE_SUP_RINGTONE;
        break;
    }

    toneGenerator.startTone(tone, duration);
}

From source file:com.tenforwardconsulting.cordova.bgloc.AbstractLocationProvider.java

/**
 * Plays debug sound// w w  w. j a  va  2 s . c o  m
 * @param name
 */
protected void startTone(String name) {
    int tone = 0;
    int duration = 1000;

    if (name.equals("beep")) {
        tone = ToneGenerator.TONE_PROP_BEEP;
    } else if (name.equals("beep_beep_beep")) {
        tone = ToneGenerator.TONE_CDMA_CONFIRM;
    } else if (name.equals("long_beep")) {
        tone = ToneGenerator.TONE_CDMA_ABBR_ALERT;
    } else if (name.equals("doodly_doo")) {
        tone = ToneGenerator.TONE_CDMA_ALERT_NETWORK_LITE;
    } else if (name.equals("chirp_chirp_chirp")) {
        tone = ToneGenerator.TONE_CDMA_ALERT_CALL_GUARD;
    } else if (name.equals("dialtone")) {
        tone = ToneGenerator.TONE_SUP_RINGTONE;
    }
    toneGenerator.startTone(tone, duration);
}

From source file:uk.org.openseizuredetector.client.SdClientService.java

/**
 * beep for duration miliseconds.//from   w w  w.  j a  v a2  s . c  o  m
 */
private void beep(int duration) {
    ToneGenerator toneG = new ToneGenerator(AudioManager.STREAM_ALARM, 100);
    toneG.startTone(ToneGenerator.TONE_CDMA_ALERT_CALL_GUARD, duration);
    Log.v(TAG, "beep()");
}

From source file:com.luanthanhthai.android.liteworkouttimer.TimerFragment.java

/**
 * Sound beep/*www  . j a v a 2s .co m*/
 */
public void countDownBeep(int duration) {
    if (enableSound) {
        ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_ALARM, 100);
        tg.startTone(ToneGenerator.TONE_CDMA_ALERT_CALL_GUARD, duration);
    }
}

From source file:com.marianhello.cordova.bgloc.LocationUpdateService.java

/**
     * Plays debug sound//from   w  w  w.  j a  v  a 2  s.  com
     * @param name
     */
    private void startTone(String name) {
        int tone = 0;
        int duration = 1000;

        if (name.equals("beep")) {
            tone = ToneGenerator.TONE_PROP_BEEP;
        } else if (name.equals("beep_beep_beep")) {
            tone = ToneGenerator.TONE_CDMA_CONFIRM;
        } else if (name.equals("long_beep")) {
            tone = ToneGenerator.TONE_CDMA_ABBR_ALERT;
        } else if (name.equals("doodly_doo")) {
            tone = ToneGenerator.TONE_CDMA_ALERT_NETWORK_LITE;
        } else if (name.equals("chirp_chirp_chirp")) {
            tone = ToneGenerator.TONE_CDMA_ALERT_CALL_GUARD;
        } else if (name.equals("dialtone")) {
            tone = ToneGenerator.TONE_SUP_RINGTONE;
        }
        toneGenerator.startTone(tone, duration);
    }