client_id
field with your client_id
.
onLaunch
, onResume
, onPause
, onClose
, and onError
. These events help track the miniapp’s behavior throughout its usage lifecycle.
.logout()
:
.setCustomActionMenuItemImage
miniapp.showCustomActionMenuItem()
and miniapp.hideCustomActionMenuItem()
LEFT_TO_RIGHT
- The miniapp slides in from the left side of the screen to the right.RIGHT_TO_LEFT
- The miniapp slides in from the right side of the screen to the left.BOTTOM_TO_TOP
- The miniapp slides in from the bottom of the screen to the top.TOP_TO_BOTTOM
- The miniapp slides in from the top of the screen to the bottom.FADE_IN
- The miniapp fades in gradually from completely transparent to opaque.BOTTOM_TO_TOP
animation is the default page transition effect. You can easily change the animation to any of the other available options based on the user experience you want to provide.
io.boxo.sdk:boxo-android
to the dependencies
block of your app/build.gradle file:
Application
class or create a new one if you don’t have an Application
class yet.
Parameter | Type | Description | Default |
---|---|---|---|
multitaskMode | Boolean | Shows Miniapps in Android Recents screen when true | false |
debug | Boolean | Enables WebView debugging (Chrome DevTools) | false |
Parameter | Description | Default |
---|---|---|
permissionsPage | Setting menu item | true |
showClearCache | Clear Cache menu item | true |
showAboutPage | About Miniapp menu item | true |
Sandbox Mode | Available Miniapp Statuses | Use Case |
---|---|---|
true | Approved + InTesting | Development environment - access to miniapps still in testing |
false | Approved only | Production environment - only fully approved miniapps |
Option | Description |
---|---|
SYSTEM | Automatically matches device theme |
LIGHT | Forces light theme |
DARK | Forces dark theme |
.setCustomActionMenuItem()
to specify your custom button’s appearance.setCustomActionMenuItemClickListener()
to respond when users tap your buttonmultitaskMode
is set tofalse
. Make sure to configure it accordingly to enable page transition animations.
Customize the animation effects to enhance the user experience by setting the appropriate page transition animation when opening a miniapp.
You can choose from the following page animations:
LEFT_TO_RIGHT
- The miniapp slides in from the left side of the screen to the right.RIGHT_TO_LEFT
- The miniapp slides in from the right side of the screen to the left.BOTTOM_TO_TOP
- The miniapp slides in from the bottom of the screen to the top.TOP_TO_BOTTOM
- The miniapp slides in from the top of the screen to the bottom.FADE_IN
- The miniapp fades in gradually from completely transparent to opaque.BOTTOM_TO_TOP
animation is the default page transition effect. You can easily change the animation to any of the other available options based on the user experience you want to provide.
LifecycleListener
. These events help you monitor user interactions and manage app state transitions.
flutter pub get
):
dependencies:
appboxo_sdk: ^0.8.0
Add this line to android/gradle.properties
Prop | Type | Description |
---|---|---|
clientId | string | your client id from dashboard |
userId | string | (optional) hostapp userId, will be used for the Consent Management |
language | string | language value will be passed to the miniapp |
sandboxMode | boolean | switch to sandbox mode |
enableMultitaskMode | boolean | (Android only) Each miniapp appears as a task in the Recents screen. |
theme | ’light’ | ‘dark’ | ‘system’ | theme for splash screen and other native components used inside miniapp. |
isDebug | boolean | enables webview debugging |
showPermissionsPage | boolean | use it to hide “Settings” from Miniapp menu |
showClearCache | boolean | use it to hide “Clear cache” from Miniapp menu |
showAboutPage | boolean | use it to hide “About Page” from Miniapp menu |
miniappSettingsExpirationTime | number | use it to change miniapp settings cache time in sec. Default: 60 sec |
Prop | Type | Description |
---|---|---|
appId | string | miniapp id |
data | object | (optional) data as Map that is sent to miniapp |
theme | ’light’ | ‘dark’ | ‘system’ | (optional) miniapp theme “dark” | “light” (by default is system theme) |
extraUrlParams | object | (optional) extra query params to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
urlSuffix | string | (optional) suffix to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
colors | ColorOptions | (optional) provide colors to miniapp if miniapp supports |
enableSplash | boolean | (optional) use to skip miniapp splash screen |
saveState | boolean | (optional) use to save state on close miniapp |
pageAnimation | ’BOTTOM_TO_TOP’ | ‘TOP_TO_BOTTOM’ | ‘LEFT_TO_RIGHT’ | ‘RIGHT_TO_LEFT’ | ‘FADE_IN’ | (optional) use to change launch animation for miniapp |
Prop | Type |
---|---|
primaryColor | string |
secondaryColor | string |
tertiaryColor | string |
Prop | Type |
---|---|
miniapps | [MiniappData] |
error | string |
Prop | Type |
---|---|
appId | string |
name | string |
category | string |
description | string |
logo | string |
Param | Type |
---|---|
eventName | ’custom_event’ |
listenerFunc | (customEvent: CustomEvent) => void |
Prop | Type |
---|---|
appId | string |
requestId | number |
type | string |
errorType | string |
payload | object |
Param | Type |
---|---|
eventName | ’payment_event’ |
listenerFunc | (paymentEvent: PaymentEvent) => void |
Prop | Type |
---|---|
appId | string |
transactionToken | string |
miniappOrderId | string |
amount | number |
currency | string |
status | string |
hostappOrderId | string |
extraParams | object |
Param | Type |
---|---|
eventName | ’miniapp_lifecycle’ |
listenerFunc | (lifecycle: LifecycleEvent) => void |
Prop | Type |
---|---|
appId | string |
lifecycle | string |
error | string |
Prop | Type | Description |
---|---|---|
clientId | string | your client id from dashboard |
userId | string | (optional) hostapp userId, will be used for the Consent Management |
language | string | language value will be passed to the miniapp |
sandboxMode | boolean | switch to sandbox mode |
enableMultitaskMode | boolean | (Android only) Each miniapp appears as a task in the Recents screen. |
theme | ’light’ | ‘dark’ | ‘system’ | theme for splash screen and other native components used inside miniapp. |
isDebug | boolean | enables webview debugging |
showPermissionsPage | boolean | use it to hide “Settings” from Miniapp menu |
showClearCache | boolean | use it to hide “Clear cache” from Miniapp menu |
showAboutPage | boolean | use it to hide “About Page” from Miniapp menu |
miniappSettingsExpirationTime | number | use it to change miniapp settings cache time in sec. Default: 60 sec |
Prop | Type | Description |
---|---|---|
appId | string | miniapp id |
data | object | (optional) data as Map that is sent to miniapp |
theme | ’light’ | ‘dark’ | ‘system’ | (optional) miniapp theme “dark” | “light” (by default is system theme) |
extraUrlParams | object | (optional) extra query params to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
urlSuffix | string | (optional) suffix to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
colors | ColorOptions | (optional) provide colors to miniapp if miniapp supports |
enableSplash | boolean | (optional) use to skip miniapp splash screen |
saveState | boolean | (optional) use to save state on close miniapp |
pageAnimation | ’BOTTOM_TO_TOP’ | ‘TOP_TO_BOTTOM’ | ‘LEFT_TO_RIGHT’ | ‘RIGHT_TO_LEFT’ | ‘FADE_IN’ | (optional) use to change launch animation for miniapp |
Prop | Type |
---|---|
primaryColor | string |
secondaryColor | string |
tertiaryColor | string |
Prop | Type |
---|---|
miniapps | [MiniappData] |
error | string |
Prop | Type |
---|---|
appId | string |
name | string |
category | string |
description | string |
logo | string |
Prop | Type |
---|---|
appId | string |
requestId | number |
type | string |
errorType | string |
payload | object |
Prop | Type |
---|---|
appId | string |
transactionToken | string |
miniappOrderId | string |
amount | number |
currency | string |
status | string |
hostappOrderId | string |
extraParams | object |
Prop | Type |
---|---|
appId | string |
lifecycle | string |
error | string |