When defining templates for mobile app messages, you can use the default versions or customize templates. Follow these best practices when customizing mobile app message templates.
File size limits for media attachments in iOS 10
If you are adding media attachments to mobile app messages in iOS 10 apps, follow Apple’s size limits for audio, images, and video:
Types: wav, aiff, mp3 or m4a
Max Size: 5MB
Types: gif, jpg, png
Max Size: 10MB
Types: mp4, mpg, avi
Codec: MPEG, MPEG2, MPEG4, AVI
Max Size: 50MB
For more details about Apple’s supported file types for media, see UNNotificationAttachment.
Because images can be resized at the time they are displayed, IBM does not recommend or restrict image dimensions.
File sizes for media in in-app messages
The Mobile App Messaging in-app template provides default size settings for media; however, if you are customizing the in-app template, consider the following guidelines when setting file sizes for media:
- Mobile devices support many different screen sizes, and for this reason, IBM does not recommend or restrict file sizes for images in in-app messages. To determine the best file size for your images, target one or more devices where your customers are most likely to view the in-app message and configure the corresponding image to look best on these devices.
- File sizes affect download speeds and device connection speeds. For this reason, configure images to use the smallest file size that looks good on target devices.
- Design in-app messages that target your typical user. For example, if most of your users use high speed connections and appreciate highly stylized apps, you can use large images. However, if your customers are likely to avoid apps that consume a lot of bandwidth, smaller images are better.
- You can customize in-app messages to support multiple images of different sizes. The only disadvantage to this setup is that the server must also provide different images of various sizes.
In Apple devices, this setup can be simplified by using a base name, such as foo.jpg, for an image, and then downloading a double-sized image email@example.com from the server. If the device uses a retina screen, such as UIScreen.mainScreen.scale, or a iPhone Plus devices, the size can be tripled, firstname.lastname@example.org.
In Android devices, this setup is mostly handled by the generic density of the display (ldpi, mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi). For details, see Supporting Multiple Screens in Android.
Character limits and recommended fonts
Although the Mobile App Messaging SDK does not limit the number of characters in text fields, a 256 character limit on text fields is enforced by Watson Campaign Automation. There is no recommended font for mobile app messages.
When customizing templates, consider how the following factors affect the length and quality of messages:
- The device where the message is displayed – Messages display differently on different devices and screens. Consider that there are many different device types and screen sizes that mobile users use.
- The typeface of the operating system on the mobile device – Different operating systems use different default typefaces, which affects how messages are displayed.
- Display settings on the mobile user’s device – Individual mobile users configure devices based on their individual needs. For example, mobile users with bad eyesight might set the font size to large.
As a best practice, IBM recommends that you start messages with the most important information and add less important information to the bottom of message.