Example usage for android.media ToneGenerator TONE_CDMA_ALERT_NETWORK_LITE

List of usage examples for android.media ToneGenerator TONE_CDMA_ALERT_NETWORK_LITE

Introduction

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

Prototype

int TONE_CDMA_ALERT_NETWORK_LITE

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

Click Source Link

Document

CDMA Alert Network Lite tone: 1109Hz 62ms ON, 784Hz 62ms ON, 740Hz 62ms ON 622Hz 62ms ON, 1109Hz 62ms ON

Usage

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

/**
 * Plays debug sound/*from   www  . j a v a  2 s. c om*/
 * @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  .  ja  v a 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:com.marianhello.cordova.bgloc.LocationUpdateService.java

/**
     * Plays debug sound/*  w  ww .  jav  a  2 s. c o m*/
     * @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);
    }