Skip to main content

bn.onAppHide

onAppHide: (cb: AppHideCallback) => void

description Listens on the event that Mini Program is switched to background. The callback timing for this event is consistent with that of App.onHide. Use bn.onHide, bn.offHide for MiniGame.

example

const handler = (payload) => { console.log(payload) }bn.onAppHide(handler)

Type declaration

▸ (cb): void

Parameters

NameType
cbAppHideCallback

Returns

void


AppHideCallback#

Ƭ AppHideCallback: () => void

Type declaration

▸ (): void

Returns

void