createInstance

最近更新时间:2022-09-20 05:17:40


flutter static ARRtmClient.createInstance           ({
     Context            context,
     String             appId,
     RtmClientListener  eventListener 
})                              throws Exception

创建一个 ARRtmClient 实例。

AR RTM 支持多个 ARRtmClient 实例。

ARRtmClient 类的所有接口函数都是异步调用。

参数

contextRTM 活动的上下文.

appIdAR 为 App 开发者签发的 APP ID。如果你的开发包里没有 App ID,请从AR申请一个新的 App ID。

eventListenerRtmClientListener 用于向 App 报告 RTM SDK 运行时的事件。

返回

一个 ARRtmClient 对象。

异常

Exception如果 appId 无效,或者 contexteventListener 其一为空,会返回异常信息。

Implementation

Future <void> ARRtmClient.createInstanc{
    String RtmClientListener    eventListener
}