Push notifications typically consist of several key components that dictate how your message will appear and sound on user devices. Below, we outline the components for both iOS and Android platforms with their specific restrictions and defaults.
Component | Description | Details |
---|---|---|
Title | Brief headline displayed at the top of the notification. | - Recommended length: 30-50 characters. - Exceeding length may result in truncation depending on the device screen size. |
Description | Main content or body of the notification. | - Recommended length: 100-200 characters. - Longer descriptions may be truncated. |
Image | Optional image displayed within the notification. | - Format: JPG, PNG, GIF (Static GIF). - Recommended size: less than 1MB. - Resolution: Ideally less than 2,048 x 2,048 pixels. |
Priority | Defines how urgently the notification is delivered to the device. | - High Priority: Immediate delivery, wakes up devices. - Normal Priority: Batched delivery for optimized battery usage. |
Component | Description | Details |
---|---|---|
Subtitle (Optional) | Secondary line of text beneath the title. | - Recommended length: approximately 30-50 characters. |
Category | Customizable actions defined in the notification settings. | - Links notifications with predefined action buttons. |
Thread Identifier | Used to group notifications visually in the Notification Center. | - String value that identifies notification threads. |
Component | Description | Details |
---|---|---|
Channel | Defines the notification importance level and behavior. | - Android-specific categorization required for Android 8.0+. |
Icon | Small icon displayed in the notification status bar. | - Format: PNG, with transparency. - Size: Typically 24x24 dp. |
Color | Accent color for the notification icon background. | - Defined using HEX color code. |
Visibility | Controls how notifications appear on the lock screen. | - Options: Public, Private, or Secret. |