Migration to SDK 3.0
The migration to JOIN Stories SDK 3.0 offers several enhancements and new features that improve the functionality and performance of the experience in your application.
This guide will help you smoothly migrate your existing implementation to JOIN Stories SDK 3.0.
SDK Initialization
When you wanted to initialise the SDK in your Application class, you used JoinStories.init(...)
. Now, you need to use :
JOINStories.init(
context: Context,
joinTeamId: String
)
UI Customizations
Deprecated methods / classes
UI Customizations options via XML and view parameters have been removed. These customizations are now available with the configuration object (see details).
Bubble View
Integration
The integration of a bubble widget has been improved and simplified. Before, you had to integrate StoryScaffoldView
and StoryPlayer
views like that :
<com.joinstoriessdk.androidsdk.ui.StoryScaffoldView
android:id="@+id/story_scaffold"
android:layout_width="0dp"
android:layout_height="144dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.joinstoriessdk.androidsdk.ui.player.StoryPlayer
android:id="@+id/story_player"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
val thumbView = StoryScaffoldView(context)
val storyPlayer = StoryPlayer(context)
view.addView(thumbView)
view.addView(storyPlayer)
thumbView.setStoryPlayer(storyPlayer)
Now you just need to integrate the bubble with BubbleTriggerView
. The player is fully managed by the SDK :
<com.joinstoriessdk.androidsdk.ui.BubbleTriggerView
android:id="@+id/join_trigger"
android:layout_width="match_parent"
android:layout_height="wrap_content"
...
/>
val bubbleTriggerView = BubbleTriggerView(context)
view.addView(bubbleTriggerView)
Configuration
To customize bubble and player, you had to use view parameters of StoryScaffoldView
and StoryPlayer
. Now, you just use configuration classes to customize. For example :
val thumbView = StoryScaffoldView(context)
val storyPlayer = StoryPlayer(context)
thumbView.loaderWidth = 8
thumbView.storyViewedIndicatorColor = Color.GRAY
thumbView.storyViewedIndicatorAlpha = 80
storyPlayer.playerCornerRadius = 10f
storyPlayer.playerProgressBarDefaultColor = "#FFFFFF66"
BubbleTriggerView(context).apply {
bubbleConfiguration = BubbleConfiguration(
loaderWidth: 8,
storyViewedIndicatorColor = Color.parse("#CC808080")
)
playerConfiguration = PlayerConfiguration(
playerCornerRadius = 10f,
playerProgressBarDefaultColor = Color.parse("#FFFFFF66")
)
}
Bubble Initialization
To initialize stories data, you need to use the JOINStoriesInit
object instead of the startThumbView(...)
method used before :
BubbleTriggerView(context).init = JOINStoriesInit(alias: String)
Deeplink
The integration and use of deeplinks has been modified. You can find details of the implementation here: Deeplink.
Configurations changes
Bubble View
Parameters | Changes | Informations |
---|---|---|
showPlayButton | New | Allow to display a play button |
thumbViewSize | New | Bubble thumbview size can now be customized |
labelFont (typeface) | Renamed | Parameter typeface has been renamed to labelFont |
thumbViewOverlayColor | Removed | We now have animations to show clicks on bubbles, overlay is not needed anymore. |
loaderInnerViewWidth | Removed | Always the same width to respect UI standards |
loaderInnerViewColor | Removed | Always transparent to respect UI standards |
Player
Parameters | Changes | Informations |
---|---|---|
playerShowShareButton | Removed | The sharing is now always disabled (may be updated in the future) |
playerClosingButton | Removed | The closing button is now always displayed |
Updated 6 months ago