BannerAd.hide收藏我的收藏
收藏
我的收藏基础库 1.3.0 开始支持本方法,这是一个同步方法。
隐藏广告。
前提条件 | 无 |
业务背景 | 无 |
使用限制 | 无 |
注意事项 | 无 |
相关教程 | 无 |
语法
BannerAd.hide()
参数说明
无
返回值
无
错误码
errorCode | errMsg | errorType | 说明 | 最低支持版本 |
---|---|---|---|---|
999991 | internal error | F | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
999987 | feature is not supported in app | D | 1.3.0 | |
999991 | context exception | F | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
122501 | current activity is null, can not create game banner | D | 1.3.0 | |
122503 | Please apply for an adUnitId | D | 1.3.0 | |
122502 | can not create game banner | F | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
999987 | The scene does not support advertising | D | 1.3.0 | |
999999 | The adUnitId is empty | D | 1.3.0 | |
122504 | The adUnitId is closed | D | 1.3.0 | |
122505 | The adUnitId is prohibit | D | 1.3.0 | |
122506 | The adUnitId is invalid | D | 1.3.0 | |
999993 | internal error | F | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
999991 | The banner advertisement for current adUnitId doesn't exist | F | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
999991 | ad not found | F | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
999999 | unitid is illegal | D | 1.3.0 | |
122503 | unitid is illegal | D | 1.3.0 | |
122507 | unitid is illegal | D | 1.3.0 | |
999981 | unitid is illegal | D | 1.3.0 | |
122505 | unitid is illegal | D | 1.3.0 | |
999993 | unitid is illegal | F | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
999999 | The adUnitId is empty | D | 1.3.0 | |
122503 | The adUnitId is invalid | D | 1.3.0 | |
122507 | unknown ad type | D | 1.3.0 | |
999993 | The adUnitId is invalid | F | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
代码示例
bannerAd.onLoad(() => { bannerAd.show().then(() => { console.log("广告显示成功"); setTimeout(() => { bannerAd.hide(); console.log("广告隐藏"); }, 2000); }); });
点击纠错