js-miniapp-bridge - v1.1.0 › MiniAppFeatures
Interface: MiniAppFeatures
A module layer for webapps and mobile native interaction.
Hierarchy
- MiniAppFeatures
Implemented by
Index
Methods
Methods
getUniqueId
▸ getUniqueId(): Promise‹string›
Defined in js-miniapp-sdk/src/miniapp.ts:16
Returns: Promise‹string›
The Promise of provided id of mini app from injected side.
requestCustomPermissions
▸ requestCustomPermissions(permissions
: CustomPermission[]): Promise‹CustomPermissionResult[]›
Defined in js-miniapp-sdk/src/miniapp.ts:30
Request that the user grant custom permissions related to accessing user data. Typically, this will show a dialog in the Host App asking the user grant access to your Mini App. You can pass multiple permissions at once and the Host App will request all of those permissions within a single dialog.
Parameters:
Name | Type | Description |
---|---|---|
permissions |
CustomPermission[] | An array containing CustomPermission objects - permission name and description |
Returns: Promise‹CustomPermissionResult[]›
Promise with the custom permission results - “ALLOWED” or “DENIED” for each permission
requestLocationPermission
▸ requestLocationPermission(): Promise‹string›
Defined in js-miniapp-sdk/src/miniapp.ts:19
Returns: Promise‹string›
The Promise of permission result of mini app from injected side.
setScreenOrientation
▸ setScreenOrientation(screenOrientation
: ScreenOrientation): Promise‹string›
Defined in js-miniapp-sdk/src/miniapp.ts:46
Swap and lock the screen orientation. There is no guarantee that all hostapps and devices allow the force screen change so MiniApp should not rely on this.
Parameters:
Name | Type | Description |
---|---|---|
screenOrientation |
ScreenOrientation | The action that miniapp wants to request on device. |
Returns: Promise‹string›
The Promise of screen action state from injected side.
shareInfo
▸ shareInfo(info
: ShareInfoType): Promise‹string›
Defined in js-miniapp-sdk/src/miniapp.ts:38
Parameters:
Name | Type | Description |
---|---|---|
info |
ShareInfoType | The shared data must match the property in [ShareInfoType]. |
Returns: Promise‹string›
The Promise of share info action state from injected side.