Launch GluedIn as Guest
Launch Gluedin Dashboard as a Guest user on Button click: Sample code below:
fun launchGluedAsGuestUser() {
val callback: GluedInSDKCallBack = object : GluedInSDKCallBack {
override fun onSdkInitSuccess(
isSuccess: Boolean,
gluedInSdkException: GluedInSdkException?
) = Unit
override fun onSdkLogout() = Unit
override fun onUserProfileClick(userId: String) = Unit
override fun onAppAuthSuccess(
isSuccess: Boolean,
gluedInSdkException: GluedInSdkException?
) = Unit
override fun onGluedInShareAction(shareData: ShareData) = Unit
override fun onLoginRegistrationRequired(
currentVideo: VideoInfo?,
isLoginAction: Boolean
) = Unit
override fun onProductCTAClicked(assetId: String, eventRefId: Int) = Unit
override fun onSdkExit() = Unit
}
val gluedInConfigurations = GluedInInitializer.Configurations.Builder()
.setSdkCallback(callback)
.setApiKey("put_your_api_key")
.setSecretKey("put_your_secret_key")
.setFeedType(GluedInInitializer.Configurations.FeedType.VERTICAL) // GluedInInitializer.Configurations.FeedType.SQUARE
.create()
gluedInConfigurations.validateAndLaunchGluedInSDK(
this,
GluedInConstants.LaunchType.APP,
intent
)
}
Launch GluedIn as Authenticated user
Call Gluedin Signin screen method to init gluedin authentication module before going any other screen and process the navigation flow which fits to your application. We show the sample code below:
func launchGluedAsRegisteredUser() {
val callback: GluedInSDKCallBack = object : GluedInSDKCallBack {
override fun onSdkInitSuccess(
isSuccess: Boolean,
gluedInSdkException: GluedInSdkException?
) = Unit
override fun onSdkLogout() = Unit
override fun onUserProfileClick(userId: String) = Unit
override fun onAppAuthSuccess(
isSuccess: Boolean,
gluedInSdkException: GluedInSdkException?
) = Unit
override fun onGluedInShareAction(shareData: ShareData) = Unit
override fun onLoginRegistrationRequired(
currentVideo: VideoInfo?,
isLoginAction: Boolean
) = Unit
override fun onProductCTAClicked(assetId: String, eventRefId: Int) = Unit
override fun onSdkExit() = Unit
}
val gluedInConfigurations = GluedInInitializer.Configurations.Builder()
.setSdkCallback(callback)
.setApiKey("put_your_api_key")
.setSecretKey("put_your_secret_key")
.setFeedType(GluedInInitializer.Configurations.FeedType.VERTICAL) // GluedInInitializer.Configurations.FeedType.SQUARE
.setUserInfoForAutoSignIn(UserInfoAutoSignIn("email_id", "password", "full_name", "profile_picture"))
.create()
gluedInConfigurations.validateAndLaunchGluedInSDK(
this,
GluedInConstants.LaunchType.APP,
intent
)
}
Deeplink changes:
If user is coming from the external deeplink (i.e. WhatsApp, FB or Instagram) and a particular SDK screen needs to be open then using the below SDK method, user can be navigated on respective screen.
val localIntent = Intent()
localIntent.data = "medium=medium_id".toUri()
gluedInConfigurations.validateAndLaunchGluedInSDK(
this,
GluedInConstants.LaunchType.APP,
localIntent,
)
Medium Types
1. content
2. hashtag
3. challenge
Medium Id
1. In case of content, it must be the content/videoId
2. In case of hashtag, it must be the hashtagTitle
3. In case of challenge, it must be the challengeId