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

ParametersChangesInformations
showPlayButtonNewAllow to display a play button
thumbViewSizeNewBubble thumbview size can now be customized
labelFont (typeface)RenamedParameter typeface has been renamed to labelFont
thumbViewOverlayColorRemovedWe now have animations to show clicks on bubbles, overlay is not needed anymore.
loaderInnerViewWidthRemovedAlways the same width to respect UI standards
loaderInnerViewColorRemovedAlways transparent to respect UI standards

Player

ParametersChangesInformations
playerShowShareButtonRemovedThe sharing is now always disabled (may be updated in the future)
playerClosingButtonRemovedThe closing button is now always displayed