本文整理汇总了Java中android.media.ToneGenerator.TONE_CDMA_ABBR_ALERT属性的典型用法代码示例。如果您正苦于以下问题:Java ToneGenerator.TONE_CDMA_ABBR_ALERT属性的具体用法?Java ToneGenerator.TONE_CDMA_ABBR_ALERT怎么用?Java ToneGenerator.TONE_CDMA_ABBR_ALERT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.media.ToneGenerator
的用法示例。
在下文中一共展示了ToneGenerator.TONE_CDMA_ABBR_ALERT属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startTone
/**
* Plays debug sound
* @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);
}
开发者ID:QuintechDevOps,项目名称:cordova-plugin-quintech-background-geolocation,代码行数:23,代码来源:AbstractLocationProvider.java
示例2: startTone
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);
}
开发者ID:greensea,项目名称:cordova-plugin-passive-geolocation-service,代码行数:19,代码来源:PassiveGeolocationService.java