miniapp / com.rakuten.tech.mobile.miniapp / MiniApp

MiniApp

abstract class MiniApp

This represents the contract between the consuming application and the SDK by which operations in the mini app ecosystem are exposed. Should be accessed via MiniApp.instance.

Functions

create Creates a mini app. The mini app is downloaded, saved and provides a MiniAppDisplay when successful.abstract suspend fun create(appId: String, 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.abstract suspend fun create(appInfo: MiniAppInfo, miniAppMessageBridge: MiniAppMessageBridge, miniAppNavigator: MiniAppNavigator? = null, miniAppFileChooser: MiniAppFileChooser? = null, queryParams: String = ""): MiniAppDisplay
createWithUrl Creates a mini app using provided url. Mini app is NOT downloaded and cached in local, its content are read directly from the url. This should only be used for previewing a mini app from a local server.abstract suspend fun createWithUrl(appUrl: String, miniAppMessageBridge: MiniAppMessageBridge, miniAppNavigator: MiniAppNavigator? = null, miniAppFileChooser: MiniAppFileChooser? = null, queryParams: String = ""): MiniAppDisplay
fetchInfo Fetches meta data information of a mini app.abstract suspend fun fetchInfo(appId: String): MiniAppInfo
getCustomPermissions Get custom permissions with grant results per MiniApp from this SDK.abstract fun getCustomPermissions(miniAppId: String): MiniAppCustomPermission
getDownloadedManifest Get the currently downloaded manifest information e.g. required and optional permissions.abstract fun getDownloadedManifest(appId: String): MiniAppManifest?
getMiniAppManifest Get the manifest information e.g. required and optional permissions.abstract suspend fun getMiniAppManifest(appId: String, versionId: String): MiniAppManifest
listDownloadedWithCustomPermissions lists out the mini applications available with custom permissions in cache.abstract fun listDownloadedWithCustomPermissions(): List<Pair<MiniAppInfo, MiniAppCustomPermission>>
listMiniApp Fetches and lists out the mini applications available in the MiniApp Ecosystem.abstract suspend fun listMiniApp(): List<MiniAppInfo>
setCustomPermissions Store custom permissions with grant results per MiniApp inside this SDK.abstract fun setCustomPermissions(miniAppCustomPermission: MiniAppCustomPermission): Unit

Companion Object Functions

instance Instance of MiniApp which uses the default config settings, as defined in AndroidManifest.xml. For usual scenarios the default config suffices. However, should it be required to change the config at runtime for QA purpose or similar, another MiniAppSdkConfig can be provided for customization.fun instance(settings: MiniAppSdkConfig = defaultConfig): MiniApp