更新时间:2024-07-30 GMT+08:00
获取错误提示
该接口用于获取错误提示。
注意事项
无
方法定义
String getErrorMessage(int errCode);
示例代码
public static void showToast(String apiName, int retCode, String desc) { String msg = HWMBizSdk.getBizOpenApi().getErrorMessage(retCode); if (TextUtils.isEmpty(msg)) { Log.i(TAG, "showToast msg == null!"); } String errorMsg = msg + "\n" + "错误码: " + retCode + "\n" + "错误描述: " + desc; BaseDialogBuilder baseDialogBuilder = new BaseDialogBuilder(DemoActivity.getInstance()); baseDialogBuilder .setMessage(errorMsg) .addAction("确定", (dialog, button, index) -> { dialog.dismiss(); }) .show(); }
父主题: 界面定制