使用appendMessages应用崩溃,点击相册/拍照/语音按钮没有弹出来相应的界面

课外admin
2021-07-22 04:03 71 1

"react-native": "0.59.9"
"react": "16.8.0"
"aurora-imui-react-native": "^0.14.0"
"jmessage-react-plugin": "^3.2.0"

测试正常的API:
注册成功(JMessage.register)=>
登录成功(JMessage.login)=>
获取会话列表成功(JMessage.getConversations)=>
创建会话成功(JMessage.createConversation)

问题1:使用appendMessages应用崩溃

代码片段:

import JMessage from 'jmessage-react-plugin';
import IMUI from 'aurora-imui-react-native';
const AuroraIController = IMUI.AuroraIMUIController;
var messages2 = [{
    msgId: "1",
    status: "send_going",
    msgType: "text",
    text: text,
    isOutgoing: true,
    fromUser: {
        userId: "1",
        displayName: "Ken",
        avatarPath: "ironman"
    },
    timeString: "10:00"
}];
AuroraIController.appendMessages(messages2)

报错信息(AS中logcat获得):
null

问题2:点击相册/拍照/语音按钮没反应

打开APP第一次点,有提示获取权限,点了确认权限后,再点击就没有反应了。会触发回调函数。
AndroidMainifest.xml存在以下权限配置

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera"/>

1个回答

热门排序
gptbots-widget