Example usage for android.media ToneGenerator TONE_CDMA_ABBR_ALERT

List of usage examples for android.media ToneGenerator TONE_CDMA_ABBR_ALERT

Introduction

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

Prototype

int TONE_CDMA_ABBR_ALERT

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

Click Source Link

Document

CDMA_ABBR_ALERT tone: 1150Hz+770Hz 400ms ON

Usage

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

/**
 * Plays debug sound/*from   w ww. j  a va 2  s .  co  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/*from   www  .j av a 2 s . co  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.bangz.shotrecorder.RecordActivity.java

private void doStartRecord() {

    doDelayStart();//from   w ww .jav  a  2  s  .c o  m

    ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_MUSIC, 100);
    tg.startTone(ToneGenerator.TONE_CDMA_ABBR_ALERT, BEEP_DURATIONMS);
    SystemClock.sleep(BEEP_DURATIONMS - 20);
    tg.stopTone();
    tg.release();

    mState = STATE_RECORDING;
    Intent intent = new Intent(this, RecordService.class);

    intent.putExtra(RecordService.EXTRA_SAMPLERATE, mSampleRate);
    intent.putExtra(RecordService.EXTRA_CHANNLES, mChannels);
    intent.putExtra(RecordService.EXTRA_ENCODDING, mEncoding);

    intent.putExtra(RecordService.EXTRA_MODE, mMode.ordinal());
    intent.putExtra(RecordService.EXTRA_MAXSHOT, this.mMaxShots);
    intent.putExtra(RecordService.EXTRA_MAXPARTIME, (int) (mMaxParTime * 1000));
    intent.putExtra(RecordService.EXTRA_CAPTURESIZE, 128);
    intent.putExtra(RecordService.EXTRA_MAXRECORDTIME, 5 * 60);
    startService(intent);

    doBindService();

    textTIME.setText(R.string.READY);
}

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

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