HomeDocs
Skip to main content

Show Desktop Add Guide Bubble

Note: There are permission restrictions. If you need to implement this feature, please contact the Mini Program team for authorization.

methodName: showAddHomeTipsToast

Additional Parameters:

PropertyTypeRequiredDefaultDescription
showTypeNumberYesBubble type. 1: Long bubble, 2: Short bubble.
showDelayTimeNumberYesTime in milliseconds for the bubble to appear after opening the Mini Program. Must be greater than 0, or the bubble will not appear.
closeDelayTimeNumberYesTime in milliseconds for the bubble to close after appearing. Must be greater than 0, or the bubble will close immediately after appearing.
messageStringNoBubble message.

Success Callback Function

Parameters

Object res

PropertyTypeDescription
successStringDescribes whether the interface call was successful or not. "true" for success, "false" for failure.

Fail Callback Function

Parameters

Object res

PropertyTypeDescription
successStringDescribes whether the interface call was successful or not. "true" for success, "false" for failure.
errMsgStringError message.
errMsg enumeration:
1. $showType is not supported: AS10002

Example Usage

const dlt = window['@transsion/byteh5bridge'];
const canCallDlt = dlt && window.dltms && window.dltms.isMiniShellGame();

if (canCallDlt) {
dlt.callApi('showAddHomeTipsToast', {
showType: 1,
showDelayTime: 5000,
closeDelayTime: 3000,
message: 'Click this',
success: (res) => {
console.log('Success: ', res);
},
fail: (res) => {
console.log('Fail: ', res);
},
complete: (res) => {
console.log('Complete: ', res);
},
});
}
Privacy agreementDeveloper agreementcontact us: developer_service.mi@transsion.com © 2024 MiniApp. All Rights Reserved.