class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle) { super.onCreate(savedInstanceState) val binding = ResultProfileBinding.inflate(layoutInflater) setContentView(binding.root) binding.name.text = "Hello world" }}```原理比较简单:编译器将生成布局同名的绑定类文件,然后在初始化的时候将布局里的 Root View 和其他预设了...
```使用的方式来说,以 `Activity` 为单位进行注册和注销截屏 ScreenCaptureCallback。并且建议在 onStart() 里注册、onStop() 里注销。``` class ScreenShotActivity : AppCompatActivity() { private ... `searchResultHighlightColor` 设置搜索匹配到的高亮0. `focusedSearchResultHighlightColor` 设置聚焦到的高亮0. `setSearchResultHighlights` 设置搜索到的文字 range0. `focusedSearchResultIndex` ...
Kotlin 的空安全特性让很多运行时 NPE 提前到编译期暴露和发现,有效降低线上崩溃的发生。我们在代码中重视对 Nullable 类型的判断和处理,我们在数据结构定义时都力求避免出现可空类型,最大限度降低判空成本;```k... activity: Activity, contentBuilder: ShareContent.Builder.() -> Unit): ShareResult = suspendCancellableCoroutine { cont -> val shareModel = ShareContent.Builder() .setEventCallBa...
Kafka Documentation 中 *[Producer Configs](https://kafka.apache.org/documentation/#producerconfigs)* 里有相关配置说明:[**compression.type**](url)生产者生成的数据的压缩类型。通过使用压缩,可以节省网络带宽和Kafka存储成本。type: stringdefault: nonevalid values: [none, gzip, snappy, lz4, zstd]importance: high [**retries**](url)生产者发送消息失败或出现潜在暂时性错误时,会进行的重试次...
onRemoteStreamStats void onStreamSubscribed void onRoomMessageReceived void onRoomBinaryMessageReceived void onUserMessageReceived void onUserBinaryMessageReceived void onUserMessageSendResult void ... 发生错误回调。 传入参数 参数名 类型 说明 err int 错误代码,详情定义见: ErrorCode 注意 SDK 运行时出现了(网络或媒体相关的)错误。SDK 通常无法自动恢复,你可能需要干预。 onStreamRemovejava void com.ss.by...
然后单击 Next。 在 Empty Activity 窗口中,完成以下操作: 在 Name 字段中输入Hello IMCloud。 在 Package name 字段中输入com.example.imclouddemo。 在 Save location 中输入项目的存储路径。 从 Language ... 报错信息: Cannot fit requested classes in a single dex file ( methods: 67777 > 65536)解决方案: defaultConfig { multiDexEnabled true} 本地依赖方式下载 SDK 的 AAR 文件到本地,解压出 imsdk.jar 并拷贝...
```使用的方式来说,以 `Activity` 为单位进行注册和注销截屏 ScreenCaptureCallback。并且建议在 onStart() 里注册、onStop() 里注销。``` class ScreenShotActivity : AppCompatActivity() { private ... `searchResultHighlightColor` 设置搜索匹配到的高亮0. `focusedSearchResultHighlightColor` 设置聚焦到的高亮0. `setSearchResultHighlights` 设置搜索到的文字 range0. `focusedSearchResultIndex` ...
onRoomMessageReceived virtual void onRoomBinaryMessageReceived virtual void onUserMessageReceived virtual void onUserBinaryMessageReceived virtual void onUserMessageSendResult virtual void onRoomMes... onRoomError(int err)Deprecated since 3.41 and will be deleted in 3.51, use onRoomStateChanged and onStreamStateChanged instead. SDK 发生错误回调。 SDK 内部遇到不可恢复错误时,会通过此回调通知 App,需要...
Kotlin 的空安全特性让很多运行时 NPE 提前到编译期暴露和发现,有效降低线上崩溃的发生。我们在代码中重视对 Nullable 类型的判断和处理,我们在数据结构定义时都力求避免出现可空类型,最大限度降低判空成本;```k... activity: Activity, contentBuilder: ShareContent.Builder.() -> Unit): ShareResult = suspendCancellableCoroutine { cont -> val shareModel = ShareContent.Builder() .setEventCallBa...
Kafka Documentation 中 *[Producer Configs](https://kafka.apache.org/documentation/#producerconfigs)* 里有相关配置说明:[**compression.type**](url)生产者生成的数据的压缩类型。通过使用压缩,可以节省网络带宽和Kafka存储成本。type: stringdefault: nonevalid values: [none, gzip, snappy, lz4, zstd]importance: high [**retries**](url)生产者发送消息失败或出现潜在暂时性错误时,会进行的重试次...
>?) { mUploadMessages = filePathCallback val chooserIntent = Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI) chooserIntent.type = "video/*" startActivityF... catch (e: Exception) { e.printStackTrace() }}//重写onActivityResult 处理结果override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(req...
>?) { mUploadMessages = filePathCallback val chooserIntent = Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI) chooserIntent.type = "video/*" startActivityF... catch (e: Exception) { e.printStackTrace() }}//重写onActivityResult 处理结果override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(req...
有关完整直播间支持的具体功能,详见 SaaS 与 aPaaS 功能差异。 进入直播间调用 joinLiveRoom 方法,让观众进入完整直播间并在 App 内显示完整直播间页面。示例代码如下所示: Java long activityId = ACTIVITY_ID; /... 包括点播发生错误和直播发生错误。此时播放处于暂停状态,您可以自行配置重试画面,引导观众点击重试播放。 * @param isPlayError 当前是否发生播放错误。 * true:发生播放错误。 * ...