本文整理匯總了Java中android.media.ToneGenerator.TONE_PROP_BEEP屬性的典型用法代碼示例。如果您正苦於以下問題:Java ToneGenerator.TONE_PROP_BEEP屬性的具體用法?Java ToneGenerator.TONE_PROP_BEEP怎麽用?Java ToneGenerator.TONE_PROP_BEEP使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類android.media.ToneGenerator
的用法示例。
在下文中一共展示了ToneGenerator.TONE_PROP_BEEP屬性的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