# setBackHandle
设置是否监控安卓手机物理返回键功能
# 请求参数
Prop | Type | Required | Default | Description |
---|---|---|---|---|
-- | String | Y | -- | on: 打开监控,off: 关闭监控 |
# 接口请求示例
nativeService.setBackHandle('on')
# 返回参数
Prop | Type | Default | Description |
---|---|---|---|
messageType | String | hardwareBackClick | 按了物理返回键 |
# 接口返回示例
this.$bridge.setBackHandle('on');
globalEvent.addEventListener('receiveMessageFromApp', (data) => {
this.$bridge.log('hardwareBackClick', data);
if (data.messageType === 'hardwareBackClick') {
// 判断是物理返回按键
this.minibarLeftButtonClick();
}
});