16

i'm using Firebase console to send a notification to my phone, the notification is successfully delivered to my phone, but i want to know, What is the Character Limit for Message text in Firebase console based notification?

enter image description here

Community
  • 1
  • 1
Sarath Kumar
  • 1,922
  • 3
  • 19
  • 43

3 Answers3

25

Firebase uses GCM for message transport. Based on the following references

  1. GCM Size Limit = 2KB (here)
  2. From FIrebase documentation size limit = 4KB (here)

Anyway if we are considering a 2KB payload size. it will come around 2000 characters.

remember to keep the message size low as much as possible.

UPDATE

The console will allow maximum of 1000 characters

Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
Christlin Panneer
  • 1,599
  • 2
  • 19
  • 31
  • 1
    Note that messages sent from the console are notification messages and the message text could be used as the body of a notification displayed on the device. If your message is too long then it will be truncated. – Arthur Thompson Jul 25 '16 at 21:32
  • 2
    Also note that eh UI will not allow a message text of more than 1024 characters – Arthur Thompson Jul 25 '16 at 21:45
5

As of today (1st Apr 2020)

Firebase console only allowing 1000 characters in the notification body:

enter image description here

Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
0

Official docks now mention 1024 for the console and 4KB for the API

Notification messages contain a predefined set of user-visible keys. Data messages, by contrast, contain only your user-defined custom key-value pairs. Notification messages can contain an optional data payload. Maximum payload for both message types is 4000 bytes, except when sending messages from the Firebase console, which enforces a 1024 character limit.

https://firebase.google.com/docs/cloud-messaging/concept-options#notifications

Zeljko Kozina
  • 129
  • 1
  • 3