Skip to content

Commit

Permalink
增加收款失败语音
Browse files Browse the repository at this point in the history
  • Loading branch information
catchpig committed Jan 19, 2018
1 parent d159f3a commit e951c83
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
Binary file not shown.
Binary file not shown.
20 changes: 11 additions & 9 deletions moneybroadcast/src/main/java/zhuazhu/voice/VoicePlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,30 @@ public static VoicePlay with(Context context) {
return mVoicePlay;
}

/**
* 收款失败
*/
public void playDefeated(){
executeStart("defeated");
}
/**
* 关闭语音播报
*/
public void playClose(){
mExecutorService.execute(new Runnable() {
@Override
public void run() {
List<String> voicePlay = new ArrayList<>();
voicePlay.add("close");
start(voicePlay);
}
});
executeStart("close");
}
/**
* 播报收款成功
*/
public void playSuccess(){
executeStart("suc");
}
private void executeStart(final String voice){
mExecutorService.execute(new Runnable() {
@Override
public void run() {
List<String> voicePlay = new ArrayList<>();
voicePlay.add("suc");
voicePlay.add(voice);
start(voicePlay);
}
});
Expand Down

0 comments on commit e951c83

Please sign in to comment.