Search code examples
push-notificationibm-cloudibm-mobile-services

Bluemix push notification message gets truncated in the system notification display


I'm developing an App using Bluemix push notification. But when the app is not launched, and notification is sent by another device. the phone does display the push notification in the system notifications, that is the list of notifications when you swipe down from the top. But the message is truncated to only the first line. How I can display the complete payload of the push notification?

Thanks and Best Regards

Jen


Solution

  • There seems to be a character limit for iOS push notifications based on the type of notification. These values can be seen in a similar Stackoverflow question:

    What is the maximum length of a Push Notification alert text?

    Alerts: Prior to iOS 7 the alerts display limit was 107 characters. Bigger messages were truncated and you would get a "..." at the end of the displayed message. With iOS 7 the limit seems to be increased to 235 characters. If you go over 8 lines your message will also get truncated.

    Banners: Banners get truncated around 62 characters or 2 lines.

    Notification Center: The messages in notification center get truncated around 110 characters or 4 lines.

    Lock Screen: Same as notification center.

    I would also recommend looking further into the Push Notification documentation provided by Apple:

    Apple Push Notification Service