-
Notifications
You must be signed in to change notification settings - Fork 17
Migration guide
- Changes in documentation
- Migration from
12.x.x
to13.x.x
- Migration from
12.3.x
to12.4.x
- Migration from
11.x
to12.x
- Migration from
11.0.x
to11.1.x
- Migration from
10.x
to11.x
- Migration from
9.x
to10.x
- Migration from
8.x
to9.x
- Migration from
7.x
to8.x
- Migration from
6.x
to7.x
- Migration from
5.x
to6.x
- Migration to Maven Central Repository - 5.2.0 version
- Migration from
4.x
to5.x
- Migration from
3.x
to4.x
- Migration from
2.x
to3.x
- Migration from
1.x
to2.x
Basic In-App notifications
renamed to Mirror Push notifications, Full featured in-app notifications
renamed to In-App messages.
Since this version, we provide support for Android 15:
- compileSdkVersion was changed from 34 to 35
- targetSdkVersion was changed from 34 to 35
Geofencing feature is DEPRECATED and not supported from SDK version 13.0.3 onwards.
Since Geofencing feature is deprecated, you might have geo messages table remain on devices database (if you used this feature). To remove the table, you can implement the following code:
SQLiteDatabase db = this.getWritableDatabase();
db.execSQL("DROP TABLE IF EXISTS geo_messages");
Scheduled jobs for Geofencing are removed from the system and no longer supported:
- GEO_TRANSITION_JOB_ID
- GEO_CONSISTENCY_JOB_ID
Version 12.4.0 onwards introduces following changes:
- added public function
InAppChatView.EventsListener.onChatWidgetThemeChanged(widgetThemeName)
to detect when Livechat widget theme is changed - added public variable
WidgetInfo.themeNames
- added public variable
WidgetInfo.multiChannelConversationEnabled
- renamed public variable
WidgetInfo.callsAvailable
toWidgetInfo.callsEnabled
- removed public variable
WidgetInfo.language
- removed public variable
InAppChatStyle.isIbDefaultTheme
- removed public variable
InAppChatToolbarStyle.isIbDefaultTheme
Since this version, minimum supported API Level is 21 (Android 5.0 - Lollipop)
To comply with security recommendations the following changes have been made to the backup policy:
Only shared preferences related to the SDK are being backed up to the cloud, along with the database. Device to device transfer is disabled to avoid registration's data processing issues. These rules can be overridden at the application level. For more information check this Backup-rules page.
usesCleartextTraffic
is now disabled by default: deeplinks, web views and images should utilize https protocol. In case http needs to be enabled, in your application's AndroidManifest file override the value as following:
<application
android:usesCleartextTraffic="true"
tools:replace="android:usesCleartextTraffic"
tools:targetApi="m" />
Version 11.1.0 onwards introduces following changes:
- added public function
InAppChatView.EventsListener.onChatReconnected()
to detect when chat is reconnected - removed public variable
InAppChatView.isChatLoaded
.
Added support for the Android 14. If your app uses gallery permissions (for example, includes in-app chat or RTC modules), then you must use READ_MEDIA_VISUAL_USER_SELECTED
permission, otherwise it would run in compatibility mode.
Because of the major release of the Infobip WebRTC SDK 2.0, content and setup exclusive of the Infobip WebRTC SDK 1.x will be deprecated on 31/10/2023. The previous WebRTC application you used must be replaced with two new separate models: CPaaS X Application and WebRTC Push Configuration.
To enable calls, you need to set up WebRTC Push configurationId
and pass it to
InfobipRtcUi.Builder
instead of deprecated applicationId
.
//old
new InfobipRtcUi.Builder(context).applicationId("Your application id");
//new
new InfobipRtcUi.Builder(context).withConfigurationId("Your push configuration id");
Version 10.0.0 onwards introduces following changes:
- added public functions:
InfobipRtcUi.Builder().withConfigurationId(configurationId)
InfobipRtcUi.Builder().withCalls(successListener, errorListener)
InfobipRtcUi.Builder().withCalls(identity, listenType, successListener, errorListener)
- renamed public functions:
-
InfobipRtcUi.Builder().customActivity()
->InfobipRtcUi.Builder().withCustomActivity()
-
InfobipRtcUi.Builder().autoDeclineOnMissingNotificationPermission()
->InfobipRtcUi.Builder().withAutoDeclineOnMissingNotificationPermission()
-
InfobipRtcUi.Builder().enableInAppCalls()
->InfobipRtcUi.Builder().withInAppChatCalls()
-
InfobipRtcUi.enableInAppCalls()
->InfobipRtcUi.enableInAppChatCalls()
-
- deprecated public function:
-
InfobipRtcUi.Builder().applicationId()
This function has no effect anymore.
-
Added support for the In-App messages. This feature is disabled by default, check Enabling In-App messages.
Notice: If you enabled the In-App messages feature, JavaScript will be enabled for the webView.
- Original
InAppView
was renamed toInAppNativeView
.
//old
void buttonPressedFor(@NonNull InAppView inAppView, @NonNull Message message, NotificationCategory category, @NonNull NotificationAction action);
//new
void buttonPressedFor(@NonNull InAppNativeView inAppView, @NonNull Message message, NotificationCategory category, @NonNull NotificationAction action);
Starting from 8.0.0 version, we introduced new possibilities in InAppChat
integration and customization. Also few dependencies are needed, if you do not have them already, when you include library as @aar:
dependencies {
...
implementation 'org.jetbrains.kotlin:kotlin-stdlib:+'
implementation 'androidx.databinding:viewbinding:+'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:+'
}
- Original
InAppChatView
was renamed toInAppChatScreen
//old
InAppChat.getInstance(context).inAppChatView().show()
//new
InAppChat.getInstance(context).inAppChatScreen().show()
- We introduced new
InAppChatView
android View which you can embed into your Activity or Fragment
We introduced new approach to customize In-app chat, where we added many new attributes to be customized. Simultaneously we have deprecated old customization approach, while there is still fallback to the old customization attributes when the new ones are not present.
Deprecated approach:
<resources>
<style name="IB_AppTheme.Chat">
<item name="colorPrimary">@color/colorPrimary</item> <!-- DEPRECATED | color of toolbar background and send chat button tint -->
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <!-- DEPRECATED | color of status / notification bar -->
<item name="colorControlNormal">@android:color/white</item> <!-- DEPRECATED | color of navigation icon in toolbar -->
<item name="titleTextColor">@android:color/white</item> <!-- DEPRECATED | color of toolbar title text -->
</style>
</resources>
<resources>
<style name="IB_AppTheme.ChatAttach">
<item name="colorPrimary">@color/colorPrimary</item> <!-- DEPRECATED | color of toolbar background -->
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <!-- DEPRECATED | color of status / notification bar -->
<item name="colorControlNormal">@android:color/white</item> <!-- DEPRECATED | color of navigation icon in toolbar -->
<item name="titleTextColor">@android:color/white</item> <!-- DEPRECATED | color of toolbar title text -->
</style>
</resources>
is equals to new approach
<resources>
<style name="IB_AppTheme.Chat">
<item name="ibChatToolbarStyle">@style/InAppChat.Demo.Toolbar</item> <!-- In-app chat toolbar style -->
<item name="ibChatAttachmentToolbarStyle">@style/InAppChat.Demo.Toolbar</item> <!-- In-app chat attachment preview toolbar style -->
</style>
<style name="Demo"/>
<style name="InAppChat.Demo.Toolbar" parent="Demo">
<item name="ibChatToolbarBackgroundColor">@color/colorPrimary</item> <!-- color of toolbar background and send chat button tint -->
<item name="ibChatStatusBarBackgroundColor">@color/colorPrimaryDark</item> <!-- color of status / notification bar -->
<item name="ibChatNavigationIconTint">@android:color/white</item> <!-- color of navigation icon in toolbar -->
<item name="ibChatTitleTextColor">@android:color/white</item> <!-- color of toolbar title text -->
</style>
</resources>
Starting from 7.0.0 version of the Mobile Messaging SDK Android 13 is supported, so user will be automatically asked for POST_NOTIFICATIONS permission, it is possible to trigger permission request later, for more details check Android 13 notification permission handling. Merged manifest should have this permission automatically added:
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
- compileSdkVersion was changed from 31 to 33
- targetSdkVersion was changed from 31 to 33
Android 13 battery resource optimization
New granular permissions for reading the different media types were introduced starting from Android 13, so they should be added, check the In-app chat docs
Starting from 6.0.0 version we've migrated library to AndroidX, changed com.google.firebase:firebase-messaging
to 22.0.0
version which has some breaking changes, changed com.google.android.gms:play-services-location
version to 18.0.0
.
- minSdkVersion was changed from 14 to 16
- compileSdkVersion was changed from 29 to 31
- targetSdkVersion was changed from 29 to 31
If previously Google Services Gradle Plugin was used, you don't need to change this part. For other ways check Registration for push notifications in Firebase Documentation
-
We have removed deprecated ECB cryptor from our SDK, so if you have installations of the application with MobileMessaging SDK version < 5.0.0, follow this article to migrate encrypted data using the new cryptor.
-
Private shared preferences are now used by default (instead of public ones) for all MM SDK's fields, no changes in code required.
Due to jCenter deprecation we moved our library to Maven Central Repository.
For using MobileMessaging libraries you will need make change in your build.gradle
files:
Before it was looking similar to this:
repositories {
jcenter()
...
}
...
dependencies {
def mm_sdk_version = '5.0.1'
implementation "org.infobip.mobile.messaging.api:infobip-mobile-messaging-android-chat-sdk:$mm_sdk_version@aar"
implementation "org.infobip.mobile.messaging.api:infobip-mobile-messaging-android-geo-sdk:$mm_sdk_version@aar"
implementation "org.infobip.mobile.messaging.api:infobip-mobile-messaging-android-resources:$mm_sdk_version@aar"
implementation("org.infobip.mobile.messaging.api:infobip-mobile-messaging-android-sdk:$mm_sdk_version@aar") {
transitive = true
}
And now should be changed to this:
repositories {
mavenCentral()
...
}
...
dependencies {
def mm_sdk_version = '5.2.0'
implementation "com.infobip:infobip-mobile-messaging-android-chat-sdk:$mm_sdk_version@aar"
implementation "com.infobip:infobip-mobile-messaging-android-geo-sdk:$mm_sdk_version@aar"
implementation "com.infobip:infobip-mobile-messaging-android-resources:$mm_sdk_version@aar"
implementation("com.infobip:infobip-mobile-messaging-android-sdk:$mm_sdk_version@aar") {
transitive = true
}
Notice: For the case if the updating of the Mobile Messaging SDK version doesn't suits you, we've released the most popular old versions of Mobile Messaging SDK to Maven Central Repository. If you are using some other version and doesn't want to update - contact our support. Anyway, after February 1st 2022, versions from jCenter will not be available, so you need to use Maven Central Repository.
Encryption algorithm changed to CBC, because ECB encryption mode should not be used per Google's recommendation. Nothing needs to be changed in code, just do not downgrade from this version, or registration will be recreated.
If you used previously in-app chat module, method for activation of chat service should be called before opening chat screen. It will start chat service, without it chat configuration will not be updated properly. Detailed instructions in wiki
- Reimport classes
MobileMessagingError
andResult
(package name changed):- old:
import org.infobip.mobile.messaging.mobile.MobileMessagingError;
, new:import org.infobip.mobile.messaging.mobileapi.MobileMessagingError;
- old:
import org.infobip.mobile.messaging.mobile.Result;
, new:import org.infobip.mobile.messaging.mobileapi.Result;
- old:
- If you used previous chat module, it's completely rewritten and if used should be newly implemented by following guidelines provided here
New versions of the SDK introduced breaking changes in API. New APIs were implemented to provide support for new features as well as to imrove overall parity between the SDK, Infobip Portal and the platform. Below you should find a list of changes you will need to do in order to have same features available on the new version of the SDK.
Old name | New name |
---|---|
REGISTRATION_CREATED |
REGISTRATION_CREATED event parameters changed
|
USER_DATA_REPORTED |
USER_UPDATED |
USER_DATA_ACQUIRED |
Obsolete, use USER_UPDATED or MobileMessaging.fetchUser(...)
|
USER_LOGGED_OUT |
DEPERSONALIZED |
Old API | New API |
---|---|
mobileMessaging.enablePushRegistration() mobileMessaging.disablePushRegistration() mobileMessaging.isPushRegistrationEnabled()
|
configure new value via installation.setPushRegistrationEnabled(...) and save installation. Get the setting via installation.isPushRegistrationEnabled() . For more details see Users and installations
|
mobileMessaging.getPushRegistrationId() |
Get the setting via installation.isPushRegistrationEnabled() . For more details see Users and installations
|
mobileMessaging.isPrimaryDevice mobileMessaging.setAsPrimaryDevice() mobileMessaging.getPrimaryDeviceSetting()
|
set new value via installation.setPrimaryDevice(...) and save installation. Get the value via installation.isPrimaryDevice() . For more details see Users and installations
|
mobileMessaging.logout(...) |
mobileMessaging.depersonalize(...) , for more details see Users and installations
|
mobileMessaging.syncUserData(...) |
Logic was decoupled into mobileMessaging.saveUser(...) and mobileMessaging.personalize(...) methods to avoid potential problems with person merging and to clarify the intent of explicitly attaching existing device to the person, for more details see here
|
mobileMessaging.fetchUserData(...) mobileMessaging.getUserData()
|
mobileMessaging.fetchUser(...) , mobileMessaging.getUser(...) for more details see Users and installations
|
Old API | New API |
---|---|
UserData class |
User class |
userData.getMsisdn() (returns String ) |
user.getPhones() (returns Set<String> ) |
userData.getEmail() (returns String ) |
user.getEmails() (returns Set<String> ) |
userData.getBirthdate() |
user.getBirthday() |
userData.getPredefinedUserData() |
Obsolete, use User properties |
userData.setCustomUserData(...) userData.getCustomUserData(...) userData.setCustomUserDataElement(...) userData.getCustomUserDataValue(...) userData.removeCustomUserDataElement(...)
|
This same functionality is now covered by custom attributes within Installation . Historically, the custom data was stored on the server within Destination model which is not the case now. We highly encourage you to use now custom attributes both at User and Installation level. For more details see Users and installations
|
If you have any questions or suggestions, feel free to send an email to support@infobip.com or create an issue.
- Library events
- Server errors
- Users and installations
- Messages and notifications management
- Inbox
Geofencing API- DEPRECATED- Android Manifest components
- Privacy settings
- In-app chat
- Infobip RTC calls and UI
- Backup rules