注册

环信android 语音信息相关

是这样的 我们的PM希望增加一个这样的功能
就是语音信息只能60秒 
当说话60秒的时候 自动发出
 
我用的是android 最新的 EaseUi 库集成的 现在已经可以检测到这个时间了
到60S的时候 应该调用什么方法 可以做出这个效果呢


58BE79E0-3F67-497C-87BF-EBFE67A7A1D0.png


 
如图 
已邀请:
// stop recording and send voice file
                    String st1 = getResources().getString(R.string.Recording_without_permission);
                    String st2 = getResources().getString(R.string.The_recording_time_is_too_short);
                    String st3 = getResources().getString(R.string.send_failure_please);
                    try {
                        int length = voiceRecorder.stopRecoding();
                        if (length > 0) {
                            sendVoice(voiceRecorder.getVoiceFilePath(), voiceRecorder.getVoiceFileName(toChatUsername),
                                    Integer.toString(length), false);

要回复问题请先登录注册