MobilePush SDK: Important Forward-Compatibility Statement
In the January, 2020 Marketing Cloud MobilePush SDK release, support for older Android and iOS versions was removed from the SDK.
- Android requires a minimum API version of 21.
- iOS requires a minimum deployment target of 10.0
Existing mobile applications will continue to function, without change. Mobile applications may continue to reference older SDK versions, without change. Applications which adopt the January, 2020 MobilePush SDK release may require a project change if your application build still supports an older value (Android: earlier than API 21, iOS: iOS 9).
Additionally, the October, 2021 Android MobilePush SDK will release with the following changes:
- Usage of Android Support libraries will migrate to the androidx-packaged library artifacts.
- If your application still depends on the old support packaging you can enable jetifier to continue using the SDK by adding the following to our project’s
gradle.properties
file.android.userAndroidX=true android.enableJetifier=true
- If your application still depends on the old support packaging you can enable jetifier to continue using the SDK by adding the following to our project’s
- Java 8 source compatibility.
- New dependency on the Kotlin std-lib.
- Small changes to the API to better align with expected method naming in Kotlin.
Android T
Support for Android T was added in the version 8.0.7 of the SDK. See the Releases section for more details.
Get Started
Integrate MobilePush into your mobile app using the SFMCSdk:
- Provision your app with Google.
- Create your app in MobilePush.
- Download the SDK and implement it for Google. Add the SDK repository URL and dependency to your build script. The SDK is downloaded when you run the build.
- Test your push messages.
- Create a test audience.
- Create a test message in the Marketing Cloud MobilePush app.
- Implement additional optional features of the SDK to take full advantage of Salesforce Marketing Cloud.
- Use a contact key to set the unique identifier used to aggregate a contact’s devices within Marketing Cloud. Set the contact key to a specific value provided by your customer or to another unique identifier for the contact, such as mobile number, email address, customer number, or another value.
- Add attributes and tags – Enhance your ability to segment your push message audiences.
- Add predictive intelligence using Einstein Recommendations – Track cart and cart conversions. Purchase this feature separately.
- Add other features – Send push notifications along with your inbox messages and trigger location-based messages with location and beacon messaging.
Contact Us
Post on our Stack Exchange. Example tags: mobilepush-android and marketing-cloud
Additional Resources
- The Marketing Cloud MobilePush Documentation contains information on the Marketing Cloud MobilePush app, including information on associating MobilePush with a mobile app.
- Review the Javadocs for the SDK.
- The Marketing Cloud provides the LearningApp for Android which implements features of the SDK to allow you to explore how a native app properly utilizes the SFMCSdk.
- View the iOS MobilePush SDK docs
Hybrid Mobile Apps
We provide support for the plugins below to implement the MobilePush SDK for your iOS and Android applications.
3rd Party Product Language Disclaimers
Where possible, we changed noninclusive terms to align with our company value of Equality. We retained noninclusive terms to document a third-party system, but we encourage the developer community to embrace more inclusive language. We can update the term when it’s no longer required for technical accuracy.
Releases
Version 8.2.0
Released July 30th, correlating with the Marketing Cloud Jul 2024 release.
Version 8.2.0 of the Android SDK has been tested with Firebase Messaging version 23.2.1, Google Play Location Services version 21.0.1, and AltBeacon Library version 2.20. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 34. The SDK depends on Java version 17.
- SDK now automatically transitions its encryption method to utilize Android Keystore.
- MD5 hashing handling – MD5 usage has been isolated into a new, separate library for optional use. Additionally, an option to forcibly remove MD5 has been added to the
MarketingCloudConfig
. - Removed the deprecated Android
LocalBroadcastManager
dependency. - This release includes bug fixes and SDK improvements.
Version 8.1.5
Released February 27th, correlating with the Marketing Cloud Feb 2024 release.
Version 8.1.5 of the Android SDK has been tested with Google Play Location Services version 21.0.1, and AltBeacon Library version 2.20. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 34.
- Fix for NoClassDefFoundError – Resolved an issue where the SDK will crash while reconfiguring a running SDK if the Location Dependency is not present.
- Bug Fixes and Performance Improvements -– This release includes bug fixes and SDK improvements.
Version 8.1.4
Released January 30th, correlating with the Marketing Cloud Jan 2024 release.
Version 8.1.4 of the Android SDK has been tested with Google Play Location Services version 21.0.1, and AltBeacon Library version 2.20. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 34.
- Fix for Receiver Not Registered – Android 14’s notification trampolining fix resulted in a rare occurence of an issue unregistering a local receiver.
Version 8.1.3
Released November 9th, correlating with the Marketing Cloud Oct 2023 release.
Version 8.1.3 of the Android SDK has been tested with Google Play Location Services version 21.0.1, and AltBeacon Library version 2.20-beta1. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 34.
- Fix for Proguard obfuscating classes without package name
Version 8.1.2
Released October 19th, correlating with the Marketing Cloud Oct 2023 release.
Version 8.1.2 of the Android SDK has been tested with Google Play Location Services version 21.0.1, and AltBeacon Library version 2.20-beta1. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 34.
- Fix for NPE when parsing URI scheme
Version 8.1.1
Released October 10th, correlating with the Marketing Cloud Oct 2023 release.
Version 8.1.1 of the Android SDK has been tested with Google Play Location Services version 21.0.1, and AltBeacon Library version 2.20-beta1. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 34.
- Fix for missing requestId property in NotificationMessage
Version 8.1.0
Released October 9th, correlating with the Marketing Cloud Oct 2023 release.
Version 8.1.0 of the Android SDK has been tested with Google Play Location Services version 21.0.1, and AltBeacon Library version 2.20-beta1. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 34.
- Android 14 support
- Resolved NPE in DevStats
- Resolved InApp Message Delay not being honored
- Introduced Runtime Toggles for Analytics, Inbox, Geofence Messaging, and Proximity Messaging
Version 8.0.9
Released May 9th, correlating with the Marketing Cloud May 2023 release.
Version 8.0.9 of the Android SDK has been tested with Google Play Location Services version 21.0.1, and AltBeacon Library version 2.19.3. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 33.
- Bug Fixes and Performance Improvements – This release includes bug fixes and SDK improvements.
- Play Services Location – Support for Play Services Location 21+ added.
- Firebase Messaging– Support for Firebase Messaging 23+ added.
- Better Foreground/Background Detection – Replace Google’s anotation based detection of application foreground/background.
- JSONObject Verifier Error Resolved – A fix for the on-init crash has been implemented implemente. See Google Issue Tracker for details.
Version 8.0.8
Released January 5th, correlating with the Marketing Cloud Oct 2022 release.
Version 8.0.8 of the Android SDK has been tested with Google Play Location Services version 19.0.1, and AltBeacon Library version 2.19.3. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 33.
requestId
fix for analytics reporting issue- This release includes bug fixes and performance improvements
Version 7.4.4
Released December 12th, correlating with the Marketing Cloud June 2021 release.
Version 7.4.4 of the Android SDK has been tested with Google Play Location Services version 22.0.0, and AltBeacon Library version 2.19. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 31.
- Backport of v8’s RejectedExecutionException Fix
Version 8.0.7
Released September 29th, correlating with the Marketing Cloud Oct 2022 release.
Version 8.0.7 of the Android SDK has been tested with Google Play Location Services version 19.0.1, and AltBeacon Library version 2.19.3. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 33.
- Support for Android 13
- Support for ENS
- Support for latest Firebase Messaging
- Support for latest Beacon Messaging
redirectForAnalytics
support forRemoteNotification
- This release includes bug fixes and performance improvements
Version 8.0.6
Released May 4th, correlating with the Marketing Cloud May 2022 release.
Version 8.0.6 of the Android SDK has been tested with Google Play Location Services version 17.1.0, and AltBeacon Library version 2.19. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 31.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 8.0.5
Released March 22nd, correlating with the Marketing Cloud Mar 2022 release.
Version 8.0.5 of the Android SDK has been tested with Google Play Location Services version 17.1.0, and AltBeacon Library version 2.19. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 31.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 8.0.4
Released November 22nd, correlating with the Marketing Cloud Oct 2021 release.
Version 8.0.4 of the Android SDK has been tested with Google Play Location Services version 17.1.0, and AltBeacon Library version 2.19. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 31.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 8.0.3
Released November 12th, correlating with the Marketing Cloud Oct 2021 release.
Version 8.0.3 of the Android SDK has been tested with Google Play Location Services version 17.1.0, and AltBeacon Library version 2.19. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 31.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 8.0.2
Released November 2nd, correlating with the Marketing Cloud Oct 2021 release.
Version 8.0.2 of the Android SDK has been tested with Google Play Location Services version 17.1.0, and AltBeacon Library version 2.19. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 31.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 8.0.1
Released October 11th, correlating with the Marketing Cloud Oct 2021 release.
Version 8.0.1 of the Android SDK has been tested with Google Play Location Services version 17.1.0, and AltBeacon Library version 2.19. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 31.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
- Support for Android 12
- Support for latest Firebase Messaging
- Support for latest Beacon Messaging
Version 8.0.0
Released October 4th, correlating with the Marketing Cloud Oct 2021 release.
Version 8.0.0 of the Android SDK has been tested with Google Play Location Services version 17.1.0, and AltBeacon Library version 2.19. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 31.
- DEPRECATED BUILD—Please use v8.0.1 or greater.
Version 7.4.3
Released September 3rd, correlating with the Marketing Cloud June 2021 release.
Version 7.4.3 of the Android SDK has been tested with Google Play Location Services version 22.0.0, and AltBeacon Library version 2.19. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 31.
- Android 12 Support-Backported Android 12 support from 8.x version of the SDK
Version 7.4.2
Released September 2nd, correlating with the Marketing Cloud June 2021 release.
Version 7.4.2 of the Android SDK has been tested with Google Play Location Services version 20.3.0, and AltBeacon Library version 2.17.1. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 29.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 7.4.1
Released June 11th, correlating with the Marketing Cloud June 2021 release.
Version 7.4.1 of the Android SDK has been tested with Google Play Location Services version 17.1.0, and AltBeacon Library version 2.17.1. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 29.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 7.4.0
Released June 2nd, correlating with the Marketing Cloud June 2021 release.
Version 7.4.0 of the Android SDK has been tested with Google Play Location Services version 17.1.0, and AltBeacon Library version 2.17.1. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 29.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 7.3.1
Released November 25th, correlating with the Marketing Cloud November 2020 release.
Version 7.3.1 of the Android SDK has been tested with Google Play Location Services version 21.0.0, and AltBeacon Library version 2.17.1. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 29.
Bug Fixes and Performance Improvements
- Fixed a rare issue where the SDK could crash silently during initialization when upgrading from an old version of the SDK
- Fixed an issue where clicking a Geofence or Beacon message did not open the provided OpenDirect URL
- Fixed an issue where the SDK could crash when re-obfuscated by the consuming mobile application
- Corrected an SDK debug log incorrectly logging as error
- Updated 3rd party dependencies for Google Play Services, Kotlin support and the AltBeacon library
Version 7.3.0
Released October 12th, correlating with the Marketing Cloud October 2020 release.
Version 7.3.0 of the Android SDK has been tested with Google Play Location Services version 17.0.0, and AltBeacon Library version 2.16.4. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 29.
- Bug Fixes and Performance Improvements—This release fixes a crash on Android 21 (Lollipop) - Android 23 (Marshmallow) related to the FullImageFill In-App Message type, and a rare IllegalAccessError on a network failure.
Version 7.2.0
Released June 1st, correlating with the Marketing Cloud June 2020 release.
Version 7.2.0 of the Android SDK has been tested with Google Play Location Services version 17.0.0, and AltBeacon Library version 2.16.4. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 29.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 7.1.0
Released March 23rd, correlating with the Marketing Cloud March 2020 release.
Version 7.1.0 of the Android SDK has been tested with Google Play Location Services version 17.0.0, and AltBeacon Library version 2.16.4. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 29.
- Image Fill for Full-Page In-App Messages – Currently, the full-page in-app message template crops images to a 16:9 aspect ratio. With this update, images can fill a larger portion of the screen and drive engagement with your app. Update to the March release of the MobilePush SDK to support image fill for full-page in-app messages. Image fill is available to customers with MobilePush and Journey Builder.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 7.0.0
Released February 24th, correlating with the Marketing Cloud February 2020 release.
Version 7.0.0 of the Android SDK has been tested with Google Play Location Services version 17.0.0, and AltBeacon Library version 2.16.4. The minimum compatible Android API version is 21, and the SDK was compiled with Android API version 29.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 6.4.0
Released October 28th, correlating with the Marketing Cloud October 2019 release.
Version 6.4.0 of the Android SDK has been tested with Google Play Location Services version 17.0.0, and AltBeacon Library version 2.16.3. The minimum compatible Android API version is 16, and the SDK was compiled with Android API version 29.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 6.3.5
Released September 25th, correlating with the Marketing Cloud June 2019 release.
Version 6.3.5 of the Android SDK has been tested with Google Play Location Services version 16.0.0, and AltBeacon Library version 2.16.2. The minimum compatible Android API version is 16, and the SDK was compiled with Android API version 29.
- Bug Fixes and Performance Improvements—This release includes bug fixes and performance improvements.
Version 6.3.4
Released July 25th, correlating with the Marketing Cloud June 2019 release.
Version 6.3.4 of the Android SDK has been tested with Google Play Location Services version 16.0.0, and AltBeacon Library version 2.16.2. The minimum compatible Android API version is 16, and the SDK was compiled with Android API version 29.
- Android Q Support - This release of the SDK adds support for the new
ACCESS_BACKGROUND_LOCATION
permission. The changes in Android Q require that you request this permission from your users when on an Android Q device for Geofence and Beacon messaging. See the Geofences and Beacon documentation pages for more details. - JobIntentService Bug Fix - Added code to prevent an unhandled exception thrown by Google’s JobIntentService.
- Inbox Message Status - This release better reflects the read or deleted state of an inbox message in Marketing Cloud.
- New LearningApp - This release includes an updated, simplified, and modern sample app using the MobilePush SDK - see our LearningApp.
Version 6.3.3
Released June 25th, correlating with the Marketing Cloud June 2019 release.
Version 6.3.3 of the Android SDK has been tested with Google Play Location Services version 16.0.0, and AltBeacon Library version 2.16.1. The minimum compatible Android API version is 16, and the SDK was compiled with Android API version 28.
- Deliver in-app messages-Deliver relevant, personalized messages to your app’s users. You can now send messages without relying on users having enabled push notifications. Engaging full-screen, modal, or banner messages are presented while your users are interacting with your app. See In-App Messaging for more.
- Improved database recovery-Rarely, the database used by the SDK becomes corrupt. To resolve any issues before initialization is complete, we added code to validate the database and its structure during initialization.
- Fixed rare system bug-Certain Android devices and versions can cause issues when modifying the message data associated with a notification’s PendingIntent. To avoid these issues, we changed the structure of the data stored in the PendingIntent.
Version 6.2.2
Released May 21st, correlating with the Marketing Cloud April 2019 release.
Version 6.2.2 of the Android SDK has been tested with Google Play Location Services version 16.0.0, and AltBeacon Library version 2.16.1. The minimum compatible Android API version is 16, and the SDK was compiled with Android API version 28.
- Prevent crash on Android O or newer-Some devices running Android O, or newer can exhibit a bug where the SDK will attempt to create a job using Android’s JobScheduler when there are already 100 scheduled jobs. This would result in Android throwing an IllegalStateException. We added code to prevent this crash and improve logging when the issue occurs.
Version 6.2.1
Released April 23rd, correlating with the Marketing Cloud April 2019 release.
Version 6.2.1 of the Android SDK has been tested with Google Play Location Services version 16.0.0, and AltBeacon Library version 2.16.1. The minimum compatible Android API version is 16, and the SDK was compiled with Android API version 28.
- Required app endpoint (tenant-specific endpoint)—To pass the SDK’s configuration, an app endpoint is now required. Find the app endpoint for your app under Administration in MobilePush. Review Configuration Requirements for details.
- Enforced critical update to Firebase Cloud Messaging for Android SDK—For your app to continue receiving messages, you must update your SDK to version 6.0.1 or later and configure your app with Firebase initialized.
- Added ability to delay registration until contact key is set—Use a new SDK configuration value to delay registrations to Marketing Cloud until a contact key is set via
setDelayRegistrationUntilContactKeyIsSet()
. Review Delay Registration for details. - Inbox messages support
sendDateUtc
for sorting—Inbox messages delivered to your app now include the date that the message was sent. App users can sort their inbox based on this value. Review Inbox for more information. - Added ability to set read or deleted by inbox message ID only—Added convenience methods to set the status of an inbox message to read or deleted with only the message’s ID as an argument.
Version 6.1.0
Released February 11th, correlating with the Marketing Cloud January 2019 release.
Version 6.1.0 of the Android SDK has been tested with Google Play Location Services version 16.0.0, and AltBeacon Library version 2.15.2. The minimum compatible Android API version is 16, and the SDK was compiled with Android API version 28.
- Implemented message segmentation—The Android SDK now supports app control over which push notifications, geofence messages, and beacon messages are displayed. Use the region information provided for geofence and beacon messages in your notification presentation logic. Review Notification Segmentation.
- Implemented predictive intelligence identifier (PIID) configuration options and APIs—You can configure the identifier for predictive intelligence analytics according to how you use Personalization Builder. Configure your applications to use either existing contact key data or a PI-specific identifier. Review Analytics, Einstein Recommendations, and Collect API.
- Added ability to unregister a WhenReadyListener passed to requestSdk—Reference the
unregisterWhenReadyListener()
documentation.
Version 6.0.2
Released December 5th, correlating with the Marketing Cloud 215.1 release.
Version 6.0.2 of the Android SDK has been tested with Google Play Location Services version 15.0.1, and AltBeacon Library version 2.14. The minimum compatible Android API version is 16, and the SDK was compiled with Android API version 27.
- Corrected Registration Frequency Issue – We corrected an issue in the SDK that would allow for multiple registration requests to be sent to the Marketing Cloud within a small amount of time. Now, registration edits will be properly batched and sent once per minute.
- Improved SdkState Logging – To improve our ability to support you during debugging sessions we have improved the SDK state output.
Version 6.0.2
Released October 22nd, correlating with the Marketing Cloud 215 release.
Version 6.0.2 of the Android SDK has been tested with Google Play Location Services version 15.0.1, and AltBeacon Library version 2.14. The minimum compatible Android API version is 16, and the SDK was compiled with Android API version 27.
- Replaced GCM with FCM – We removed the deprecated Google Cloud Messaging library and replaced it with Firebase Cloud Messaging. You will now need to configure your application so that Firebase is initialized. See Implementing the SDK in Android for more details.
- Simplified Notification Customization & Handling – The MarketingCloudConfig.Builder has been simplified by consolidating all of the notification customization options into a single NotificationCustomizationOptions class. See Customizing Notifications for details.
- Fewer Required Dependencies – The Google Play Services Location and AltBeacon dependencies are no longer declared in the SDK’s pom file as required dependencies. Follow the instructions for enabling Geofence and Beacon messaging if your application requires these features.
- Improved Initialization Verification – We added additional checks to the
MarketingCloudConfig
builder to ensure that the necessary information is provided before the SDK is initialized. These checks include ensuring that an icon resource for notifications is provided and that notification channels are handled. To allow for this change you will need to update your call to MarketingCloudConfig.Builder#build(Context) to pass in an Android Context. - Default Notification Channel – the SDK will now create a default notification channel named “Marketing”. See Custom Channels for details on how to modify this channel.
- Removed Attribute class – We removed the previously deprecated
Attribute
class along with any associated methods. Registration attributes are now provided in a key-value Map. - Removed DefaultUrlPresenter – We removed the SDK’s built-in URL presenter to remove security concerns. As such, you must override notification handling if your message will redirect to a web URL, resource, file or other business logic driven custom application schema. See Handling URLs for more information.
- Tenant Specific Endpoint – Two new methods were added to the MarketingCloudConfig.Builder to facilitate Tenant Specific Endpoints:
setMarketingCloudServerUrl()
andsetMid()
these values will configure the SDK to communicate with the specific server for your application. Please refer to the documentation for guidance on where to find your Tenant Specific Endpoint and MID. - Improved Kotlin interoperability – Addressed issues reported by the Kotlin interoperability Android lint check.
- Added nullability annotations to all public APIs.
- Reversed parameter order of MarketingCloudSdk’s whenReady method to make the interface eligible for SAM conversion.
- Fixed region message url locale bug - For locales that do not use
.
as the decimal separator, the SDK would request region messages in a format that is not supported by the Marketing Cloud. This was corrected to enforce that.
would be used regardless of device locale. –>