Skip to content

Upgrade to Bandyer SDK v2.x

Kristiyan Petrov edited this page Apr 6, 2021 · 1 revision

This new version comes with general improvements, comes with APIs that have been simplified to let the SDK integration be easier for third part apps.


Min API version supported

  • Upgrade from api-16 to api-21

Initialize the BandyerSDK

The BandyerSDK.Builder has been renamed in BandyerSDK.Configuration to represent better it's usage.

Remove deprecated APIs

  • All methods from ChatObserver have been removed.
  • Second constructor of BandyerSDK.Builder(now BandyerSDK.Configuration) has been removed.

UI refactored

The UI has been completely refactored by following MaterialDesign principles, customization guide is available here

Migrate Colors

Check here the new color system and customization

Migrate BandyerSDKDesign.TextView.OngoingCallLabel

<com.bandyer.sdk_design.textviews.BandyerTextViewSubtitle
            android:id="@+id/ongoing_call_label"
            style="@style/BandyerSDKDesign.TextView.OngoingCallLabel"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:clickable="true"
            android:focusable="true"
            android:contentDescription="@string/ongoing_call_description"
            android:focusableInTouchMode="false"
            android:textColor="@android:color/white"
            android:visibility="gone" />

Replace with

<com.google.android.material.button.MaterialButton
            android:id="@+id/ongoing_call_label"
            style="@style/BandyerSDKDesign.OngoingCallButton"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:clickable="true"
            android:focusable="true"
            android:contentDescription="@string/ongoing_call_description"
            android:focusableInTouchMode="false"
            android:textColor="@android:color/white"
            android:visibility="gone" />

Migrate Watermark

<style name="BandyerSDKDesign.Call.Layout.Watermark.ImageViewStyle" parent="">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">48dp</item>
        <item name="android:src">@drawable/logo</item>
        <item name="android:adjustViewBounds">true</item>
</style>

<style name="BandyerSDKDesign.Call.Layout.Watermark.TextViewStyle" parent="">
        <item name="android:paddingStart">@dimen/space8</item>
        <item name="android:paddingLeft">@dimen/space8</item>
        <item name="android:text">@string/watermark_label</item>
        <item name="android:gravity">center_vertical</item>
</style>

Replace with

<style name="BandyerSDKDesign.CallWatermark" parent="">
        <item name="bandyer_rootLayoutStyle">@style/BandyerSDKDesign.CallWatermark.RootLayout</item>
        <item name="bandyer_iconStyle">@style/CallWatermark</item>
        <item name="bandyer_titleStyle">@style/BandyerSDKDesign.TextView.CallWatermark</item>
</style>

<style name="CallWatermark" parent="BandyerSDKDesign.CallWatermarkImageView">
        <item name="android:src">@drawable/logo</item>
</style>

Complete changes overview

v2.0.0

Clone this wiki locally