Android仿微信语音聊天

时间:2019-02-22 03:58:58
【文件属性】:

文件名称:Android仿微信语音聊天

文件大小:1.58MB

文件格式:ZIP

更新时间:2019-02-22 03:58:58

语音聊天

整理的慕课网课程仿微信语音聊天源码! AudioRecorderButton State: STATE_NORMAL, STATE_RECORDING, STATE_WANT_TO_CANCEL DialogManager Style: RECORDING, WANT_TO_CANCEL, TOO_SHORT AudioManager: prepare(); cancel(); release(); getVoiceLevel(); 伪码编写: class AudioRecorderButton { onTouchEvent() { DOWN: changeButtonState(STATE_RECORDING); Longclick->AudioManager.prepare() ->end prepared->DialogManager.showDialog(RECORDING) MOVE: if(wantCancel(x,y)) { DialogManager.showDialog(WANT_TO_CANCEL) changeButtonState(STATE_WANT_TO_CANCEL) }else { DialogManager.showDialog(RECORDING) changeButtonState(STATE_RECORDING) } UP: if(wantCancel == curState) { AudioManager.cancel(); } if(STATE_RECORDING == curState) { AudioManager.release(); callbackToActivity(url,time); } } }


网友评论