Skip to content

Migration

There are changes to various SDK libraries as well as migration requirements to consider when you move from one version of SAP BTP SDK for Android to the next.

Migration in Release 5.0

SAP BTP SDK for Android 5.0.0 Update

To be able to make projects build successfully:

  • Applications must specify version 11 for Gradle JDK.
  • Set compileSdkVersion in the android block to 31 in build.gradle at the module level.
  • Add android.jetifier.blacklist=bcprov-jdk15on in gradle.properties.

Foundation Library 5.0.0 Update

  • TheNotificationChannelConfig class now supports an additional Boolean parameter in its constructor: NotificationChannelConfig(String, String, String, Int, Boolean, Int, Boolean, LongArray, Boolean).
  • Fixed an error in interface PushCallbackListener: renamed function onRecieve to onReceive. Any class implementing PushCallbackListener should change the overridden onRecieve function name to onReceive.
  • PushService is deprecated and removed. PushService.setPushMessageStatus is replaced by BasePushService.setPushMessageStatus and PushService.NotificationStatus is replaced by PushRemoteMessage.NotificationStatus.
  • setRootLogLevel(LogPolicy) in class LogPolicy has been marked as deprecated and will be removed in a future release.
  • When creating an instance of AppConfig with the builder API, besides the appID property, host or serviceUrl also needs to be provided.

Migration in Release 4.0

Fiori Library 4.0.0 Update

  • To be able to use the new SAP Fiori with Horizon Theme, apps must specify Theme.Fiori.Horizon (or an extension of that theme) for their application theme, rather than FioriTheme.
  • Any direct uses of androidx.appcompat.widget.AppCompatButton in XML layout files should be changed instead to Button if using Button styles from either the SAP Fiori with Horizon Theme or the existing FioriTheme.
  • The data type of the plotDataSet parameter passed into ChartHeaderView.setChartPlotData() has been changed from Map<String, float[]> to Map<String, Object> to support the new Scatter Chart data type.
  • com.sap.cloud.mobile.onboarding has been deprecated in favor of com.sap.cloud.mobile.fiori.onboarding and will be removed in a future release.

Foundation Library 4.0.0 Update

Add new API SDKInitializer.start(Application, MobileService ..., APIKey) to initialize the SDK features, allowing apps to interact with mobile services using API key before authentication is performed. This API is intended to replace the existing MobileServices.start method, and can be called at the beginning of app initialization, as in Application.onCreate method. There is no need to wait for OkHttpClient and SettingsParameters to be ready, which is required in MobileServices.start.

Migration in Release 3.0

Foundation Library 3.0.0 Update

Several methods have been marked as deprecated and will be removed in a future release:

  • Logging.uploadLog(OkHttpClient, SettingsParameters) and Logging.uploadLog(OkHttpClient, SettingsParameters, UploadType) are replaced by Logging.upload(OkHttpClient, SettingsParameters) and Logging.upload(OkHttpClient, SettingsParameters, UploadType).
  • Logging.addLogUploadListener(UploadListener) and Logging.removeLogUploadListener(UploadListener) are replaced by Logging.addUploadListener(UploadListener) and Logging.removeUploadListener(UploadListener).
  • AppUsageUploader.setListener(UploadListener) is replaced by AppUsageUploader.addUploadListener(UploadListener) to register a usage listener and AppUsageUploader.removeUploadListener(UploadListener) to unregister a usage listener.
  • UsageBroker.upload(boolean, Context, AppUsageUploader.UploadListener, SettingsParameters) is replaced by calling AppUsageUploader.addUploadListener(AppUsageUploader.UploadListener) first, then calling UsageBroker.upload(Context, SettingsParameters, boolean).
  • UsageBroker.upload(boolean, Context, AppUsageUploader.UploadListener, SettingsParameters, boolean) is replaced by calling AppUsageUploader.addUploadListener(AppUsageUploader.UploadListener) first, then calling UsageBroker.upload(Context, SettingsParameters, boolean, boolean).
  • UsageBroker.upload(boolean, AppUsageUploader.UploadListener, boolean, Context) is replaced by calling AppUsageUploader.addUploadListener(AppUsageUploader.UploadListener) first, then calling UsageBroker.upload(boolean, boolean, Context).
  • UsageBroker.upload(Context, boolean, AppUsageUploader.UploadListener) is replaced by calling AppUsageUploader.addUploadListener(AppUsageUploader.UploadListener) first, then calling UsageBroker.upload(Context, boolean).

Add new API MobileServices.start(Application, OkHttpClient, SettingsParameters, Class<? extends MobileService>) to initialize the SDK features. To use this API, client code needs following changes:

  • Remove the code Logging.initialize(Context) or Logging.initialize(Context, ConfigurationBuilder). This logic is included in the new API.
  • UsageBroker.start has an internal change in 3.0.0, now it should be called only after settingsParameter set into SettingsProvider, otherwise IllegalStateException will be encountered. Or MobileServices.start can be used to initialize usage.

Last update: June 10, 2022