Initialization
The method for initializing the Wepin Android Widget Library is as follows.
import com.wepin.android.widgetlib.WepinWidgetBefore creating an instance of WepinWidget, please pass the app’s Activity Context, the app ID, and the app key assigned after app registration to the WepinWidgetParams object as shown below.
val wepinWidgetParams = WepinWidgetParams(
context = this,
appId = "your-wepin-app-id",
appKey = "your-wepin-app-key"
)Please create a WepinWidget instance by passing the previously created WepinWidgetParams.
val wepinWidget = WepinWidget(wepinPinParams)After creating the WepinWidget instance, call the initialize method to complete the initialization.
val res = wepinWidget.initialize(attributes)parameters
atrributes <WepinWidgetAttributes>
defualtLanguage<String> The default language setting for the Widget screen is'en'. Currently supported languages are'ko','en', and'ja'.defualtCurrency<String> The default currency setting for the Widget screen is'USD'. Currently supported currencies are'KRW','USD', and'JPY'.
Return value
CompletableFuture <Boolean>
Returns true if successful, and false if it fails.
Example
isInitialized
You can use the isInitialized method to check if the WepinPin instance has been successfully initialized.
The return values are as follows
<Boolean> Returns true if initialization was successful and false if it failed.
Example
changeLanguage
Changes the language displayed on the Widget screen. Currently, only 'ko', 'en', and 'ja' are supported.
Parameters
language<String>
Return value
CompletableFuture<Boolean> Returns true if successful and false if it fails.
Example
Last updated
Was this helpful?