- Print
API - Common
- Print
AccessKey Setting
Set the issued Access Key.
User Authentication
JWT Authentication
ShopLiveCommon.setUserJWT(jwt : String)
Authenticate ShopLive JWT.
ShopLiveCommon.setUserJWT(accessKey : String, user: ShopLiveCommonUser)
Authenticate with JWT token using user information. User data can be reviewed in Data Insights.
ShopLiveCommonUser
field
type
description
userId
String
A value that ensures the uniqueness of a logged-in user (Required)
name
String?
User name
age
Int?
User age
gender
ShopLiveCommonUserGender?
User gender
userScore
Int?
Integers are available from -100 to 100.
custom
Map<String, Any>?
Any data can be set up to 1KB.
It allows checking the total/login viewers' data.
Logged-in Check
Determine if JWT login has occurred.
Clear Authentication Information
Reset the configured authentication information.
ShopLiveCommon.setUtmSource(utmSource: String)
ShopLiveCommon.setUtmMedium(utmMedium: String)
ShopLiveCommon.setUtmCampaign(utmCampaign: String)
ShopLiveCommon.setUtmContent(utmContent: String)
You can track UTM Source/Medium/Campaign/Content. The data can be reviewed in the Data Insights.
Sample code
Change Entire TextFont
Change the font type of internal TextView, EditText, and Button.
field | type | description |
---|---|---|
typeface | Typeface? | Change fontType |
sample code
Check the size of the stored cache (bytes)
Check the size (in bytes) of the cached directory for photos and videos (stored in the Shoplive cache directory).
fun getCacheDirectoryBytes(context: Context): Long
field | type | description |
---|---|---|
context | Context | context |
Sample code
ShopLiveCommon.getCacheDirectoryBytes(context: Context)
Delete Cache
Delete Shoplive cache files
field | type | description |
---|---|---|
parent | File | You can remove files and directories. |
Sample code