All Products
Search
Document Center

Mobile Platform as a Service:my.offAppShow

Last Updated:Jan 12, 2024

Description

my.offAppShow

Remove the listener function for the foreground event of the mini program.

Input parameter

Function listener

The callback function for the foreground event of the mini program.

Sample code

my.offAppShow(Function listener)

const onAppShowHandler = (res) => {
    console.log('onAppShow:', res)
};

// Call the API at an appropriate time and add a listener function.
my.onAppShow(onAppShowHandler)

// Call the API at an appropriate time and remove the listener function.
my.offAppShow(onAppShowHandler)