本演示项目在Unity for Android Build中启用部分华为HMS和AGC服务,对应的类和函数的名称和用法相同。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

3.5 KiB

HuaweiService.crash

Scenario:

Description Api Reference
Enables or disables the crash data reporting function. If the function is disabled, the Crash service does not collect or report crash data. The function is enabled by default.
收集崩溃报告开关
enableCrashCollection(boolean enable) https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agconnectcrash
Triggers a crash.
测试崩溃实现
testIt() https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agconnectcrash
Sets a custom user ID.
自定义用户标识
setUserId(String userId) https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agconnectcrash
Sets the key and value for a custom key-value pair
自定义键值对
setCustomKey(String key, String value) https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agconnectcrash
Sets the key and value for a custom key-value pair
自定义键值对
setCustomKey(String key, boolean value) https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agconnectcrash
Sets the key and value for a custom key-value pair
自定义键值对
setCustomKey(String key, double value) https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agconnectcrash
Sets the key and value for a custom key-value pair
自定义键值对
setCustomKey(String key, float value) https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agconnectcrash
Sets the key and value for a custom key-value pair
自定义键值对
setCustomKey(String key, int value) https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agconnectcrash
Sets the key and value for a custom key-value pair
自定义键值对
setCustomKey(String key, long value) https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agconnectcrash
Records a custom log.
自定义日志级别
log(String message) https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agconnectcrash
Records a custom log.
自定义日志级别
log(int level, String message) https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agconnectcrash