miniapp / com.rakuten.tech.mobile.miniapp / MiniApp / create
create
abstract suspend fun create(appId:
String
, miniAppMessageBridge:
MiniAppMessageBridge
, miniAppNavigator:
MiniAppNavigator
? = null, miniAppFileChooser:
MiniAppFileChooser
? = null, queryParams:
String
= ""):
MiniAppDisplay
Creates a mini app. The mini app is downloaded, saved and provides a MiniAppDisplay when successful.
Parameters
appId
- mini app id.
miniAppMessageBridge
- the interface for communicating between host app & mini app.
miniAppNavigator
- allow host app to handle specific urls such as external link.
miniAppFileChooser
- allow host app to get the file path while choosing file inside the webview.
queryParams
- the parameters will be appended with the miniapp url scheme.
Exceptions
MiniAppNotFoundException
- when the specified project ID does not have any mini app exist on the server.
MiniAppHasNoPublishedVersionException
- when the specified mini app ID exists on the
server but has no published versions
MiniAppSdkException
- when there is any other issue during fetching,
downloading or creating the view.
RequiredPermissionsNotGrantedException
- when the required permissions of the manifest are not granted.abstract suspend fun create(appInfo:
MiniAppInfo
, miniAppMessageBridge:
MiniAppMessageBridge
, miniAppNavigator:
MiniAppNavigator
? = null, miniAppFileChooser:
MiniAppFileChooser
? = null, queryParams:
String
= ""):
MiniAppDisplay
Creates a mini app using the mini app ID and version specified in MiniAppInfo. This should only be used in “Preview Mode”. The mini app is downloaded, saved and provides a MiniAppDisplay when successful.
Parameters
appInfo
- metadata of a mini app.
miniAppMessageBridge
- the interface for communicating between host app & mini app.
miniAppNavigator
- allow host app to handle specific urls such as external link.
miniAppFileChooser
- allow host app to get the file path while choosing file inside the webview.
queryParams
- the parameters will be appended with the miniapp url scheme.
Exceptions
MiniAppNotFoundException
- when the specified project ID does not have any mini app exist on the server.
MiniAppHasNoPublishedVersionException
- when the specified mini app ID exists on the
server but has no published versions
MiniAppSdkException
- when there is any other issue during fetching,
downloading or creating the view.
RequiredPermissionsNotGrantedException
- when the required permissions of the manifest are not granted.