Skip to content

Sailthru Mobile Android SDK 5.7.0

Compare
Choose a tag to compare
@moskyb moskyb released this 18 Jun 04:40

First Things First

We've rebranded to be called Sailthru Mobile! Don't worry, nothing is changing - we'll just refer to it as the Sailthru Mobile SDK from now on πŸ™‚

Feature: Notification Titles

The Sailthru Mobile SDK will now automatically include titles in the notifications when they're added, and won't include a title when one isn't attached - previously the SDK set the title of the notification as the name of the app implementing it.

Pushes with a title will look like this:
20180618_150821

And those with no title will look like this:
20180618_150727

If you want to keep a static string as your notification title, that's totally fine! Just add a NotificationCompat.Extender that sets the builder's contentTitle:

NotificationConfig config = new NotificationConfig();
// Use Sailthru's default notification extender as our base
config.addNotificationExtender(new CarnivalNotificationExtender());
config.addNotificationExtender(new NotificationCompat.Extender() {
    @Override
    public NotificationCompat.Builder extend(NotificationCompat.Builder builder) {
        builder.setContentTitle("My cool string");
        return builder;
    }
});
Carnival.setNotificationConfig(config);

Deprecations

We've cleaned up the NotificationBundle class and made it a little easier to use:

  • We've deprecated NotificationBundle.build(Bundle), as it's exactly the same as NotificationBundler(Bundle), and a constructor makes more sense than a build method in this case
  • We've deprecated NotificationBundle.getStringFromPayload(String, Bundle), as it doesn't make much sense for a static method to access an instance of the class defining it! You can replace this with NotificationBundle#getMessageIdFromPayload(), NotificationBundle#getImageUrlFromPayload() or the newly-defined NotificationBundle#getVideoUrlFromPayload()