Globals / MiniAppUtilsProvider
Interface: MiniAppUtilsProvider
Mini App Utility methods
Hierarchy
- MiniAppUtilsProvider
Index
Methods
- canOpenAppDeeplink
- closeMiniApp
- getFeatureList
- getHostAppThemeColors
- isAppDeeplinkSupported
- isDarkMode
- miniAppFinishedLoading
- sendAnalytics
- setCloseAlert
Methods
canOpenAppDeeplink
▸ canOpenAppDeeplink(deeplinkURL
: string): Promise<boolean>
Defined in js-miniapp-sdk/src/modules/utils.ts:55
Interface to check if the device has the deeplink available.
Parameters:
Name | Type |
---|---|
deeplinkURL |
string |
Returns: Promise<boolean>
closeMiniApp
▸ closeMiniApp(withConfirmation
: boolean): Promise<string>
Defined in js-miniapp-sdk/src/modules/utils.ts:23
Mini App can be closed using this method, provided Host app is supporting this interface to close the miniapp.
Parameters:
Name | Type | Description |
---|---|---|
withConfirmation |
boolean | boolean value which will be used by the host app to show/hide close confirmation alert which should be set using setCloseAlert method in prior before calling this interface |
Returns: Promise<string>
getFeatureList
▸ getFeatureList(): Promise<string[]>
Defined in js-miniapp-sdk/src/modules/utils.ts:50
Interface to get list of features supported by the SDK and Host
Returns: Promise<string[]>
getHostAppThemeColors
▸ getHostAppThemeColors(): Promise<HostThemeColor>
Defined in js-miniapp-sdk/src/modules/utils.ts:34
Interface that is used to get the Color theme used in the Host application
Returns: Promise<HostThemeColor>
isAppDeeplinkSupported
▸ isAppDeeplinkSupported(deeplinkURL
: string): Promise<boolean>
Defined in js-miniapp-sdk/src/modules/utils.ts:60
Interface to check if the application has whitelisted the deeplink
Parameters:
Name | Type |
---|---|
deeplinkURL |
string |
Returns: Promise<boolean>
isDarkMode
▸ isDarkMode(): Promise<boolean>
Defined in js-miniapp-sdk/src/modules/utils.ts:39
Interface to check if the Device/Application is using Dark mode
Returns: Promise<boolean>
miniAppFinishedLoading
▸ miniAppFinishedLoading(): Promise<string>
Defined in js-miniapp-sdk/src/modules/utils.ts:29
Miniapp can notify the host app that it has finished loading using this call. Host app can implement this interface to perform any other actions after the miniapp has loaded.
Returns: Promise<string>
sendAnalytics
▸ sendAnalytics(analytics
: MAAnalyticsInfo): Promise<string>
Defined in js-miniapp-sdk/src/modules/utils.ts:45
Interface to send analytics to Host app
Parameters:
Name | Type |
---|---|
analytics |
MAAnalyticsInfo |
Returns: Promise<string>
setCloseAlert
▸ setCloseAlert(alertInfo
: CloseAlertInfo): Promise<string>
Defined in js-miniapp-sdk/src/modules/utils.ts:16
Mini App can choose whether to display Close confirmation alert dialog when mini app is closed
Parameters:
Name | Type | Description |
---|---|---|
alertInfo |
CloseAlertInfo | CloseAlertInfo object |
Returns: Promise<string>