SDK changelog
3.4.0
Core
Batch now compiles with Android SDK 37 (Android 17 'Cinnamon Bun').
Profile
String array attributes and topic preferences are now automatically deduplicated.
BatchProfileAttributeEditormethods (setAttribute,addToArray,removeFromArray,setTopicPreferences,addToTopicPreferences,removeFromTopicPreferences) now deduplicate values before processing, matching the behavior already applied by Batch's server and the CEP Profile API.Deduplication follows a last-wins rule: if a value already exists in the array, it is moved to the end.
Size limits are enforced after deduplication.
Breaking: Added client-side 25 kB payload size validation for custom events and profile attribute updates.
Payloads exceeding the limit are now rejected when using
BatchProfileAttributeEditor.save()orBatch.Profile.trackEvent().BatchEventAttributes.validateEventAttributes()also reports this error, making it catchable at development time.
Fixed an issue where some internal events could be skipped on Batch's servers when the CEP was not yet activated. No data was lost since it remained indexed on the MEP.
3.2.0
Profile
Profile string attributes now support up to 300 characters for the Customer Engagement Platform (CEP). The limit for the Mobile Engagement Platform (MEP) remains 64 characters. Attributes set via
BatchProfileAttributeEditor.setAttribute()longer than 64 characters will only be applied to the CEP.Event string attributes now support up to 300 characters for the Customer Engagement Platform (CEP). The limit for the Mobile Engagement Platform (MEP) remains 200 characters. Attributes set via
BatchEventAttributes.put()longer than 200 characters will only be applied to the CEP.
3.1.0
Core
Fixed an edge case where the 3.0.1 crash fix didn't work as expected when upgrading from SDK 3.0.0.
Messaging
Introduced In-App Automations within the Customer Engagement Platform.
Introduced
Spacercomponent for creating flexible empty space within In-App messages.Added support for In-App WebView format within the Customer Engagement Platform.
Added
filloption for In-App component height.
3.0.1
Core
Fixed an issue where an app upgraded from Batch SDK 1.x/2.x could crash once when Android tried to run a Job scheduled by the SDK.
Messaging
Fixed an issue preventing content scrolling in In-App messages displayed as modals at the top or bottom of the screen.
Fixed an issue where In-App messages might not display during
NEW SESSIONevents.
Event Dispatcher
Fixed an issue causing
getTrackingId()inBatch.EventDispatcher.Payloadto return null for CEP (Customer Engagement Platform) messages.
3.0.0
This is a major release, please see our migration guide for more info on how update your current Batch implementation.
Core
Batch now compiles with SDK 36 (Android 16 'Baklava').
Batch now uses Kotlin (1.9.0) internally. This should not affect your existing Java-based integrations as public APIs remain in Java.
Push
Fixed an issue where push notifications could display a blank area when the image download failed.
Added
Batch.Push.setShowNotificationsmethod to control whether push notifications should be displayed.Added
Batch.Push.shouldShowNotificationsmethod to check current notification display settings.Removed
PushNotificationTypeenum and related methodsgetNotificationsTypeandsetNotificationsTypefromBatch.Push. You should now usesetShowNotificationsto control whether Batch should display notifications or not. Note that Batch still preserves your previous values andshouldShowNotificationswill reflect them.
Profile
Fixed an issue preventing Turkish-speaking users from correctly setting Email/SMS subscription states.
Messaging
Added coompatibility for Mobile Landings with Push v2 which can be created from the drag & drop composer in the Batch Dashboard.
Added interface
Batch.Messaging.InAppInterceptorand methodBatch.Messaging.setInAppInterceptorin order to handle messages yourself.Added method
loadMessagingViewto control when and how a mobile landing will be displayed.LifecycleListenerhas been redesigned:Added method
onBatchMessageClosed(String, MessagingCloseReason).Added enum
Batch.Messaging.LifecycleListener.MessagingCloseReasonwhich indicates why an In-App message was closed.Updated method
onBatchMessageActionTriggered. Theindexparameter has been replaced byctaIdentifier. This method is still called on MEP (Mobile Engagement Platform) messages, but you will now receive an identifier built from the old cta index : “mepCtaIndex:” + index.Removed individual close callback methods(
onBatchMessageCancelledByUser,onBatchMessageCancelledByAutoclose,onBatchMessageCancelledByError,onBatchMessageClosed). Use the new unifiedonBatchMessageClosed(String, MessagingCloseReason)method.Removed method
onBatchMessageWebViewActionTriggered. This will now triggered ononBatchMessageActionTriggeredwith theanalyticsIDasctaIdentifier.Constant
GLOBAL_TAP_ACTION_INDEXnow returns a String instead of an int.
Removed
Batch.Messaging.LifecycleListener2interface, you should now useBatch.Messaging.InAppInterceptorwithsetInAppInterceptor.Removed enum
Formatand methodgetFormatfromBatchMessage. You should now check thekindof aBatchMessagingViewto use the dedicated right methods to show your message.Removed methods
loadFragmentandloadBannerfromBatch.Messaging. Use the newloadMessagingViewmethod instead.Removed class
BatchBannerView. UseBatchMessagingViewreturned byloadMessagingViewinstead.Renamed method
getContentfrom classBatchInAppMessagetogetMEPContent. This method will return null for messages coming from the CEP (Customer Engagement Platform).
Debug
Added support for edge-to-edge display in
BatchDebugActivity.
2.1.2
This release backports changes from 3.x
Profile
Fixed an issue where some internal events could be skipped on Batch's servers when the CEP was not yet activated. No data was lost since it remained indexed on the MEP.
Push
Fixed an issue where push notifications could display a blank area when the image download failed.
Profile
Fixed an issue for turkish-speaking users where setting the Email/SMS subscription state didn't work as expected
2.1.0
Core
Batch now compiles with SDK 35 (Android 15 'Vanilla Ice Cream').
Opted-out the Batch Debug Activity from Android 15 edge-to-edge enforcement.
Profile
Added
setPhoneNumberAPI to theBatchProfileAttributeEditorclass. This requires to have a user identifier registered or to call theidentifymethod beforehand.Added
setSMSMarketingSubscriptionAPI to theBatchProfileAttributeEditorclass.Strengthened custom user identifier validation on
identifyAPI to avoid unintended values.
2.0.3
Core
Fixed an issue where Batch wasn't clearing some data when using
Batch.optOutAndWipeData(). Since version 2.0, the Batch SDK caches some data (such as device language/region) to detect changes. It's this data that was not deleted when calling the opt-out method with data deletion. This issue only affects local SDK data and not server-side data.
2.0.0
This is a major release, please see our migration guide for more info on how update your current Batch implementation.
⚠️ Batch now requires Android min SDK level 21 or higher.
Core
All deprecated APIs in the SDK v1 have been removed and some others have been renamed/reworked.
The
Configclass has been removed with all related methods likeBatch.setConfig(Config config)API. You should now useBatch.start(String apiKey).Removed
setCanUseAndroidIDmethod fromConfigwith no equivalent.Removed
setCanUseInstanceIDmethod fromConfigwith no equivalent.Removed
setShouldAutomaticallyRegisterPushmethod fromConfigwith no equivalent.Removed
setUseAdvancedDeviceInformationmethod fromConfig. You should now use the newBatch.updateAutomaticDataCollectionAPI. Please see our documentation for more information.Removed
Batch.getApiKeywith no equivalent.Removed
Batch.shouldUseGoogleInstanceIDwith no equivalent.Removed
Batch.shouldAutoRegisterForPushwith no equivalent.Removed
Batch.isRunningInDevModewith no equivalent.Removed
Batch.shouldUseAdvancedDeviceInformationwith no equivalent.
Core - Advertising ID
Batch has dropped the support for Android Advertising ID. You can no longer set an advertising id to Batch and all related APIs have been removed.
Removed
setCanUseAdvertisingIDmethod fromConfigwhich was a no-op.Removed
Batch.shouldUseAdvertisingIDwhich was a no-op.Removed
Batch.getAdvertisingIDwhich was a no-op.Removed class
AdsIdentifierProvider.Removed class
AdsIdentifierProviderAvailabilityException.Removed class
AdsIdentifierProviderAvailabilityException.
Core - New APIs
Added
Batch.updateAutomaticDataCollectionto fine-tune the data sent by the SDK since Batch will not resolve the user's location/region and will not send device type and brand by default.Added
Batch.disableMigration(EnumSet<BatchMigration>)to explicitly disable some profile's data migration when running the SDK V2 for the first time if your app is linked to a project.
User
Most of all user's related APIs have been removed and replaced with their equivalent in the new Profile module. Only the reading methods are still present for backward-compatibility but keep in mind this methods are only about the installation data and not your Profile since it may be updated from another source.
Removed deprecated API
Batch.User.getEditor.Removed deprecated class
BatchUserProfile.Removed method
printDebugInformationwith no equivalent.Removed method
trackTransactionwith no equivalent.Removed method
Batch.User.editorand the related classBatchUserDataEditor, you should now useBatch.Profile.editorwhich return an instance ofBatchProfileAttributeEditor.Added
Batch.User.clearInstallationData()which allows you to remove the installation data without modifying the current profile.
Push
Batch has dropped support for old push providers (GCM, IID) and now only support for FCM's Token APIs. Overriding the Sender ID is no longer possible in any way due to Firebase limitations.
Removed deprecated method
Batch.setGCMSenderId.Removed deprecated class
BatchPushData.Removed deprecated method
getPriorityfromBatchPushPayload.Removed
Batch.Push.getLastKnownPushToken. You can now get the whole registration withBatch.Push.getRegistrationand usegetTokento access to the push token registration.Batch now defaults to showing foreground notifications rather than directly displaying mobile landings.
Added
Batch.Push.requestNotificationPermission(context, listener)API to request the notification permission with a callback notifying whether the permission has been granted or not.Batch does not honor the
batch_push_fcm_sender_id_overrideAndroidManifest meta-data anymore.
Event
This version introduced two new types of attribute that can be attached to an event : Array and Object.
Removed deprecated method
Batch.trackEvent(String event, String label, JSONObject data).Removed all
trackEventAPIs from the user module. You should now useBatch.Profile.trackEvent.BatchEventDatahas been renamed intoBatchEventAttributes.Removed
addTagAPI fromBatchEventDataYou should now use the$tagskey withputStringListmethod.Removed parameter
labelfromtrackEventAPI. You should now use the$labelkey inBatchEventAttributeswith theput(string, string)method.Added support for Array and Object attributes with the added APIs to
BatchEventAttributes:put(String key, BatchEventAttributes value)putObjectList(String key, List<BatchEventAttributes> value)putStringList(String key, List<String> value)
Added
validateEventAttributesmethod toBatchEventAttributeswhich return a list of human-readable errors to ensure your event attributes are valid before sending them.
Inbox
Removed deprecated
Batch.Inbox.getFetchermethod.Removed deprecated
isDeletedmethod fromBatchInboxNotificationContent.
Profile
Introduced Profile, a new module that enables interacting with profiles. Its functionality replaces most of the User module used to do.
Added
identifyAPI as replacement ofBatch.User.editor().setIdentifier.Added
editormethod to get a new instance of anBatchProfileAttributeEditoras replacement ofBatchUserDataEditor.Added
trackEventAPIs as replacement of theBatch.User.trackEventmethods.Added
trackLocationAPI as replacement of theBatchUser.trackLocationmethod.
1.21.0
BREAKING
Removed support for optional Play Core library. You should now use the Play In-App Review Library. Please see our documentation for more info.
Core
Removed automatic collection of AAID (Android Advertising Identifier).
setCanUseAdvertisingIDis now a no-op. You need to collect it from your side and pass it to Batch via the addedBatch.User.editor().setAttributionIdentifier(id)method.
Push
To help with FCM v1 API migration, the SDK will send the GCP Project ID associated to the FCM Token to Batch's backend. This is not supported in legacy GCM/FCM Instance ID modes.
1.20.0
Core
Batch now compiles with and targets SDK 34 (Android 14 'Upside Down Cake').
Fixed a rare issue where the SDK could trigger an ANR on start when upgraded from an older version.
Push
Improved notification image by making notifications taller if possible and changing scaling type to Center Fit.
User
Added
Batch.User.editor().setEmail(email)method. This requires to have a user identifer registered or to call thesetIdentifiermethod on the editor instance beforehand.Added
Batch.User.editor().setEmailMarketingSubscriptionState(BatchEmailSubscriptionState)method to subscribe to the email marketing list.
Inbox
Added the ability to know if a
BatchLandingMessagehas been displayed from the inbox via theisDisplayedFromInbox()method.Added the ability to know if a notification has a landing message attached on
BatchInboxNotificationContentusing thehasLandingMessage()method.Added the ability to display a landing message attached to a
BatchInboxNotificationContentusing thedisplayLandingMessage(context)method.
1.19.2
Core
Batch now compiles with and targets SDK 33 (Android 13).
Improved support for Android 13 Tiramisu.
Added a new API:
Batch.Push.requestNotificationPermission(context). This allows you to request for the new notification permission introduced in Android 13. See the documentation for more info.Fixed an issue where
BatchNotificationChannelsManager.openSystemChannelSettings(context)wasn't working with an application context.
Actions
Added
batch.android_smart_reoptin, which asks the user the notification permission or redirect to the notification settings.Added
batch.android_redirect_settings, which redirects the user to the notification settings.
1.19.1
Core
Fixed a rare crash on Wiko devices when a high priority push was received in battery saving mode.
Event Dispatcher
Fixed a crash that could happen when using Batch SDK 1.19+ with ATInternet or Firebase dispatcher plugins < 3.0.
Messaging
Fixed a display issue on Modals with an image but no title.
1.19.0
Core
Batch now compiles and targets SDK 32 (Android 12L).
Important change: Batch now declares to use the
android.permission.POST_NOTIFICATIONSpermission in its manifest. If you want to remove it, add<uses-permission android:name="android.permission.POST_NOTIFICATIONS" tools:node="remove" />in your app's AndroidManifest.Fixed some rare ANRs produced when receiving push.
Identical push messages sent twice by FCM will now only be displayed once.
Batch will now try to display FCM high priority push notifications directly rather than scheduling a Job.
Event Dispatchers
Added
getNameandgetVersiononBatchEventDispatcher. If you are using a Batch dispatcher plugin, please update it.
Messaging
Added global frequency capping management for in-app campaigns.
Improved the way In-App campaigns are triggered.
Added just-in-time verification for in-app campaigns.
Inbox
Added the ability to disable the filtering of silent notifications on
BatchInboxFetcherusing thesetFilterSilentNotificationsmethod.Important change: Silent notifications are now filtered by default: use the new property if you relied on the previous behaviour. This brings the Android SDK in line with its iOS counterpart, which has always filtered silent notifications as expected.
1.18.2
Core
Fixed an issue where the AAR's shrinking would result in classes being repackaged as generic names outside of "com.batch.android". This could have caused package collisions in some cases. The shrinking behaviour now matches pre-1.18 releases.
Messaging
Fixed some rare crashes and improved out of memory handling in In-App Messaging.
Improved error handling in WebView In-Apps. They should now behave more like a browser when encountering load failures.
Changed the way In-App campaigns start and end dates are computed on Samsung devices to be more reliable.
Prevent Xiaomi devices from overriding theme colors in dark mode.
Debug
Fixed an issue where the FindMyInstallation feature could lead to a crash.
1.18.0
Core
Fixed detection of indonesian, hebrew and yiddish languages.
Improved how the device locale is detected to better support language variations.
Fixed an issue where the direct opens weren't always tracked in singleTop/singleTask activities using
onNewIntent.
Events
The event tracker now retries less aggressively in deteriorated network conditions.
Added URL type (using
java.net.URI) in event data.
Attributes
Added URL type in custom attributes.
Messaging
Fixed an issue where in-app campaigns could lead to a crash of the app when swiping to dismiss.
Added support for Activity Exclusion. This allows to easily exclude some activities such as a splash screen from Batch rather than having to implement a Do Not Disturb mode. Intent forwarding is automatically handled by the SDK.
Push
Added compatibility with FCM Tokens. Batch now supports firebase-messaging 22.0.0 natively without having to add
firebase-iid.
Inbox
Batch will now cache notifications marked as read or deleted to avoid any synchronization issues.
Method
isDeleted()from BatchInboxNotificationContent is now deprecated.
Debug
Fixed an issue where the debug activity would show the advertising identifier even if it was disabled. The bug was purely cosmetic and the identifier was not sent to Batch.
Batch will now copy the installation ID to the clipboard when the application is foregrounded multiple times in a short timespan. This is enabled by default, you can disable it at any moment by using
Batch.setFindMyInstallationEnabled(false).
1.17.3
Event Dispatchers
Fixed an issue where event dispatchers added via
Batch.EventDispatcher.addDispatcher()were unregistered when Batch stopped: they will stay registered. Statically declared (such as Batch's builtin ones) were unregistered and re-registered on start: those are now loaded only once in the Application's lifetime.
1.17.2
Core
Added a package query entry in AndroidManifest.xml for
com.android.vendingto make Play Store detection work more accurately on Huawei devices.
Messaging
Fix in-app campaigns cache being unreadable.
User
Fixed an issue where builtin event track action would not be able to parse dates on Lollipop and lower.
1.17.1
Core
Fixed a memory leak due to Batch retaining the first activity that appeared on screen.
Actions
Fixed a bug where
batch.user.eventwould fail is no event label was specified. This aligns the behaviour with iOS' implementation.
User
Tracking an event with an empty label now behaves as if the label was null. Event labels that are only composed of whitespaces are unchanged for compatibility.
Messaging
Caching has been disabled on the WebView format.
1.17.0
Core
Added a package query entry in AndroidManifest.xml for
com.huawei.appmarketto enable detection of the Huawei AppGallery.Added missing
android:exportedmanifest attributes in preparation for Android 12.
Actions
Added
batch.rating, which asks the user to review your app using the Google Play In-App Review API. To enable in-app review, add thecom.google.android.play:coredependency to your project. If the library is missing or fails, the SDK will open the Play Store/Huawei AppGallery.Added
batch.clipboard, which can copy text to the clipboard.
Messaging
Added support for a new UI format: WebView. See documentation for more info.
Added
onBatchMessageCancelledByErroronBatch.Messaging.LifecycleListener, called when a message could not be loaded due to an error when loading the message's content.Added
onBatchMessageWebViewActionTriggeredonBatch.Messaging.LifecycleListener, called when a in-app webview format action has been triggered.In-App campaign cache is now cleared on server errors
Push
Important change: Push open pending intents are now created with
FLAG_IMMUTABLEon Android M and higher in preparation for Android 12. This also applies toPendingIntentinstances returned byBatch.Push.makePendingIntent*()methods.
Event Dispatchers
Added the new event types
MESSAGING_CLOSE_ERRORandMESSAGING_WEBVIEW_CLICK. See javadoc for more info.
1.16.4
This release backports changes from 1.17.1
Core
Fixed a memory leak due to Batch retaining the first activity that appeared on screen.
Actions
Fixed a bug where
batch.user.eventwould fail is no event label was specified. This aligns the behaviour with iOS' implementation.
User
Tracking an event with an empty label now behaves as if the label was null. Event labels that are only composed of whitespaces are unchanged for compatibility.
1.16.0
Core
Batch is now built using the Android 11 (API Level 30) SDK, and targets it. Android 11 is fully supported.
Batch is now built using R8 rather than proguard.
Add support for Push/Advertising ID plugins.
Support for TLS versions older than 1.2 has been disabled for devices on Lollipop and higher. Devices on 4.1 to 4.4 might still use TLS 1.1 for compatiblity.
Should to fix an issue where Google would report a security issue in
com.batch.android.c.h.cdue to our usage of an ECB cipher. We've always used standard HTTPS for our network communication: the weak encryption is only used for an additional layer of security on disk and during transport.
Inbox
Enhanced the way the SDK fetchs notifications from the servers to greatly reduce bandwidth usage. No public API change.
Messaging
Fixed an issue where In-App messages might not survive rotation with newer AndroidX core versions.
Fixed an issue where rotating an autoclosable In-App message would not show the right countdown.
Fixed an issue where LeakCanary would temporarily report a leak with autoclosable messages. This was due to a delayed callback that eventually went away: Batch now cancels it sooner.
Auto closable In-App messages won't attempt to dismiss themselves in the background anymore: they'll check if they should have been in onStart.
1.15.2
Messaging
Fixed a crash where the app would crash if the user rotated an automatically dismissing fullscreen/modal/image template.
User
Added support for Date in BatchEventData.
BatchEventData now supports up to 15 attributes (used to be 10).
BatchUserAttribute now has a public constructor for easier mocking.
1.15.1
Core
Tweaked how the log levels work to be more like how logcat works. The default logger level is now INFO and INTERNAL implies all other log levels. Breaking: LoggerLevel.isGreaterOrEqual has been renamed to LoggerLevel.canLog
Push
The "Registration ID/Push Token" log has been accidentally set as internal in 1.15.0. It is now public again.
1.15.0
BREAKING
Migrated to AndroidX. Batch now explicitely depends on androidx core. The SDK now explicitly depends on
androidx.core:core:1.0.0. Please upgrade your version of the support library accordingly.BatchNotificationAction.getSupportActions no longer throws exception com.batch.android.MissingDependencyException, as androidx.core is now an explicit dependency.
Core
Fix an exception that occurred when the
<application>entry in the manifest had no<meta-data>children.Improved In-App view tracker error handling.
Added support for external analytics using
EventDispatcher. See the documentation for more details.Added a new feature for developers: a debug view is now available using
Batch.Debug.startDebugActivity.Remove obfuscation on
BatchOptOutResultListener.ErrorPolicyenum.Added the ability to change the logger level using
Config.
Actions
Added an interface
BatchDeeplinkInterceptorto override some aspects of a deeplink that Batch wants to open.
Messaging
Improved accessibility of all message formats
Fixed an issue where an Image/Modal format set to auto close would crash if the user moved to another app before the countdown was elapsed.
Push
System notification authorization is now reported to Batch's servers. This includes channels support: the default channel override is used to measure the status if set, otherwise Batch's default channel is used.
Batch.Push.setNotificationsColor()now explicitly takes a ColorIntBatch.Push.setSmallIconResourceId()now explicitly takes a DrawableResThe notification default color will now be the value of your theme's
colorPrimaryattribute rather than black.If no small icon has been set when configuring Batch, the SDK will now fallback on Firebase's
com.google.firebase.messaging.default_notification_icon.
Inbox
Added the
markAsDeletedmethod onBatchInboxFetcher, allowing the deletion of notifications
User
Saving a UserDataEditor before Batch is started now enqueues the changes instead of failing. If Batch is not started before the process dies, changes will be lost. This change does not affect BatchUserProfile, which has been deprecated for a while.
1.14.1
Switched back to Proguard from R8. This should fix an issue with Firebase Performance.
Notifications using BigPictureStyle will now show the big picture as the large icon when collapsed, if no other large icon was set. Note: this feature requires androidx.core
All SDK XML resources have been marked as private and will not show up in code completion anymore.
1.14.0
BREAKING: Batch now requires Java 1.8 source support.
You may need to enable desugaring to make Batch work with your project by adding the following in your build.gradle:
android {
//...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}NOTE: This release is one of the last supporting the legacy Android support libraries. Please start migrating to AndroidX to ensure a smooth upgrade experience in the future.
Core
Requires Android Studio 3.0 or higher with d8 enabled.
Fix some potential bugs with BatchActions in some locales.
Batch will not catch RuntimeExceptions occurring in implementations of BatchNotificationInterceptor: they will now crash your app as they should have.
Batch.push.setGCMSenderId() has been deprecated: Please migrate to FCM as soon as possible. GCM and GCM-legacy support will be removed from the SDK in a later release.
Synchronization of user attributes and tags is now more optimized, resulting in less network requests.
Other various bugfixes.
Included new license information in the release zips and the artifact metadata. If you integrate using maven central, licenses will be picked up by
com.google.android.gms.oss-licenses-plugin.
User
High level data (language/region/custom user id) can now be read back.
User data (attributes and tags) can now be read back. Documentation
Push
Notification content is now visible on the lockscreen by default, even when locked. Use a notification interceptor if you want to override the visibility when showing sensitive content.
Messaging
Added support for two new UI formats: Modal, and Image. See the documentation for more information.
Added support for GIFs in Mobile Landings and In-App messages.
Added support for rich text.
Added support for text scrolling in all formats. Banners will now have a maximum body height of ~160pt, and their text will scroll.
Support for opening deeplinks from In-App Messaging and Mobile Landings into a Custom Tab
Added new methods on Batch.Messaging.LifecycleListener allowing you to track more information such as close/autoclose and button presses. More info in the Mobile Landings documentation.
Batch.Messaging.LifecycleListener methods are no longer called on each rotation
1.13.0
Core
SDK is now built with the Pie SDK, and targets API Level 28.
Opting-out from the SDK now sends an event notifying the server of this. If a data wipe has been asked, the request will also be forwarded to the server. New methods have been introduced to be informed of the status of the request to update your UI accordingly, and possibly revert the opt-out if the network is unreachable.
Push
Exposed the tag Batch uses to display notifications in the constant
Batch.NOTIFICATION_TAG. You can use this to cancel notifications, or use other APIs that require finding notifications by ID and tag.Added
Batch.Messaging.setShowForegroundLandings(). It allows you to disable Batch's default behaviour to forward push messages containing landings to the app if it is in the foreground. Call this method withfalsewill result in notifications always being posted no matter what the application state is.
Events
Event data support has been overhauled. As a result:
Introduced
BatchEventData. Use this class to attach attributes and tags to an event. See this class' documentation for more information about limits.Batch.User.trackEvent(String name, Stringlabel, JSONObject data)has been deprecatedCalls to this method will log deprecation warnings in the console
Legacy data (JSONObject) will be converted to
BatchEventData. Same data format restrictions apply: Any key/value entry that can't be converted will be ignored, and logged. Tags are not supportedIntroduced
Batch.User.trackEvent(String name, Stringlabel, BatchEventData data), replacing the deprecated method.
More info in the event documentation.
1.12.0
Batch now fully supports Firebase Cloud Messaging. Note that existing Batch integrations will NOT automatically be migrated to FCM. You should follow the migration steps before April 2019.
Added methods to handle opting-out from Batch, and wiping user data. Please see
Batch.optOut(),Batch.optOutAndWipeData()andBatch.optIn(). You can control whether Batch is opted out from by default using a manifest meta-data entry:<meta-data android:name="batch_opted_out_by_default" android:value="false" />For compatibility reasons, Batch will be enabled by default. More info in our documentation.When a push registration identifier has successfully been fetched, Batch will now broadcast it as the action definied by
Batch.ACTION_REGISTRATION_IDENTIFIER_OBTAINED. More info in the documentation.Banners now correctly track their display, and trigger a
onBatchMessageShown()call on yourLifecycleListenerif one is set.Displaying a banner will dismiss any currently displayed banner
Deprecated Config.setCanUseAndroidID: Android id is never collected anymore.
Deprecated Config.setCanUseInstanceID: users should migrate to FCM.
Added
android.permission.INTERNET,android.permission.WAKE_LOCKandandroid.permission.VIBRATEin Batch's manifest, meaning that your app will automatically require them with no additional manifest changes. This should not impact you as they're required by many libraries, including Google's, and have always been required for Batch to work. If you didn't have them already, this might trigger a permission request on pre Marshmallow devices: please look at the manifest merger output to see if this impacts you.Fixed some rare crashes that could happen on some Android emulators that broadcast malformed Google Play Services intents.
Various javadoc fixes
Note: This version is the last one supporting Android Studio 2.x. Batch 1.13 will ONLY support Android Studio 3.x and later.
1.11.0
Added support for Banners in In-App Messaging
If your app uses the Mobile Landing/In-App Messaging manual mode, you need to update your implementation to support banners. Please check the updated manual mode documentation for more information.
Fix an issue where an exception could be thrown if an invalid deeplink was supplied when setting up an In-App Message's buttons.
The SDK will now log the current Installation ID on start
1.10.2
Unobfuscated InAppMessageUserActionSource, which is implemented by BatchInAppMessage
Fixed an exception that could be thrown when using the Inbox APIs in the background. While it will not throw an exception anymore, the fetcher will still not work in these conditions if used in 'user identifier' mode: In order to fix this, please use Batch.Inbox.getFetcher(Context, String, String) rather than Batch.Inbox.getFetcher(String, String).
Fix a bug where the image of an In-App message could be distorted after a double rotation.
Added a method
getNotificationIdentifier()on BatchInboxNotificationContent, which allows you to retrieve a unique identifier for this specific notification.Added a variant of
Batch.Push.appendBatchData()compatible withBatchNotificationInterceptorimplementationsAdded
Batch.Push.makePendingIntent(Intent), to generate a valid PendingIntent from an Intent, suitable for a Notification's builder. Please note that it will override the intent's action. If you rely on a custom action, you will have to make your own PendingIntent.Added
Batch.Push.makePendingIntentForDeeplink(String), to generate a valid PendingIntent for a deeplink string, suitable for a Notification's builder, using Batch's action activity.Improve builtin proguard rules. The number of library classes kept because of Batch is now much lower.
Added detection for invalid sender IDs, and overall better error reporting when FCM/GCM registration fails.
1.10.1
Improved handling of new Android O backgrounding limitations
Fixed Do Not Disturb mode not working properly
Fixed a bug where activities opened by a push using a deeplink did not contain the
Batch.Push.PAYLOAD_KEYextraFixed an issue with Android Oreo channels
Added APIs to copy Batch's data from an intent to another. See
Batch.copyBatchExtrasAdded a method on BatchInAppMessage, allowing you to fetch the visual content of the message. See
BatchInAppMessage.getContentfor more infoAdded proguard rules to exclude support-v4 NotificationCompat related classes
1.9.2
Batch is now available on Maven Central!
Unofbuscated classes that have been wrongly obfuscated before. BatchNotificationAction is now available.
Introducing BatchNotificationInterceptor, which allows you to change the generated notificationId or change the NotificationCompat.Builder instance that Batch uses to display notifications. This allows you to add features such as a Wear extender, etc.
1.9.1
Batch SDK is now built with and targets API 26
Added support for Android 8.0 Notification Channels See Batch.Push.getChannelsManager() and our channels documentation (coming soon) to tweak how Batch handles them.
Batch requires support-v4 26.0.0, for notifications to work with Android 8.0. (As of writing, only 26.0.0-beta2 is available)
Eclipse support had been dropped
1.8.0
BREAKING CHANGE: Removed Batch.Ads and Batch.Unlock methods and related classes.
Added Batch.User.trackLocation, allowing you to natively track user position updates
Added global notification sound override using Batch.Push.setSound(Uri)
Un-obfuscated the exception returned by some of BatchPushPayload's methods
Deprecated Batch.isRunningInDevMode. It is useless, as DEV API Keys always start with "DEV"
1.6.0
Batch now requires Android 4.0.3 (API Level 15)
Batch now targets Android 7 (API Level 24), and should only be used in apps that compile with that SDK version. You should also use a v24 support-v4 library with it.
Updated notification behaviour to be more adapted to changes introduced in Nougat
setCanUseAdvancedDeviceInformation()has been introduced on theConfigobject to reduce the quantity of device information Batch will use. Note that disabling this will limit several dashboard features.BatchPushDatahas been deprecated in favour ofBatchPushPayload, which is easier to use and will allow you to read anything used by Batch's standard push receiver. It's also easier to instanciate from an intent/bundle, and easier to serialize.InstanceID support has been merged into the main SDK. If migrating from an older SDK, you'll need to add a new service in your manifest, as described in the push setup.
The overall method count has been reduced.
1.5.3
Added Batch.Push.getNotificationsType()
Threads used by Batch are now named
Batch.User.getEditor() has been renamed: Please use Batch.User.editor(). The old method will still work, but has been deprecated
Additional intent flags can now be set for the activity started when opening a Push using Batch.Push.setAdditionalIntentFlags(int)
Added "BatchActivityLifecycleHelper", an implementation of the "Application.ActivityLifecycleCallbacks" interface to use with "registerActivityLifecycleCallbacks()"
Last updated

