Get Started

Integrate MobilePush into your mobile app using the MarketingCloudSdk:

  1. Provision your app with Google.
  2. Create your app in MobilePush.
  3. 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.
  4. Test your push messages.
  5. 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 Personalization Builder – 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

Sign up for email announcements and contact us with questions or feedback about the Android SDK.

Additional Resources

Hybrid Mobile Apps

We provide support for plugins, such as Cordova, to implement the MobilePush SDK for your Android applications.

Releases

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 Services version 16.0.0 and AltBeacon Library version 2.16.1. The minimum compatible Android API version is 16. 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 Services version 16.0.0 and AltBeacon Library version 2.16.1. The minimum compatible Android API version is 16. 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 Services version 16.0.0 and AltBeacon Library version 2.16.1. The minimum compatible Android API version is 16. 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 Services version 16.0.0 and AltBeacon Library version 2.15.2. The minimum compatible Android API version is 16. 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, Personalization Builder, 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 Services version 15.0.1 and AltBeacon Library version 2.14. The minimum compatible Android API version is 16. 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 Services version 15.0.1 and AltBeacon Library version 2.14. The minimum compatible Android API version is 16. 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() and setMid() 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. –>