miniapp / com.rakuten.tech.mobile.miniapp.navigator / MiniAppExternalUrlLoader

MiniAppExternalUrlLoader

class MiniAppExternalUrlLoader

This support the scenario that external loader redirect to url which is only supported in mini app view, close the external loader and emit that url to mini app view by ExternalResultHandler.emitResult.

Functions

shouldClose In case you do not want to finish activity which contains webview automatically, use this to check should stop the external webview loader and send the current url to mini app view.fun shouldClose(url: String): Boolean
shouldOverrideUrlLoading Determine to close the external loader. Use this in the return value of WebViewClient.shouldOverrideUrlLoadingWebView,WebResourceRequest.fun shouldOverrideUrlLoading(url: String): Boolean

Companion Object Properties

returnUrlTag const val returnUrlTag: String

Companion Object Functions

loaderWithId Creates new MiniAppExternalUrlLoader.fun loaderWithId(miniAppId: String, activity: Activity? = null): MiniAppExternalUrlLoader
loaderWithUrl Creates new MiniAppExternalUrlLoader. This should only be used for previewing a mini app from a local server.fun loaderWithUrl(customAppUrl: String, activity: Activity? = null): MiniAppExternalUrlLoader