Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Is it possible to have multiline notifications? #1048

Closed
@nschild

Description

@nschild

Hello,
I am using version 3.1.2 and am having issues displaying multi-line notifications.

PushNotification.localNotificationSchedule({
    title: "this shows an ellipsis",
    message: "this is a really long message that just keeps going and going and going. After a while, the message will be truncated with an ellipsis.",
  });
};
PushNotification.localNotificationSchedule({
    title: "this shows only the first line",
    message: "this is the message. \r\n This line is hidden \r\n So is this one.",
  });
};
PushNotification.localNotificationSchedule({
    title: "this shows only the first line",
    message: `this is the message. 
This line is hidden 
So is this one.`,
  });
};
PushNotification.localNotificationSchedule({
    title: "this shows only the first line",
    message: `A comment suggested using a plus symbol to force a line break. +
This line is hidden +
So is this one.`,
  });
};

// and to cover all the bases
PushNotification.localNotificationSchedule({
    title: "this shows only the first line",
    message: "this is the message. <br> of course this is preceded by '<br>'.",
  });
};

EDIT: I added the backtick tests, suggested from a comment that was removed?

Created via the backtick newline method. When expanded, it just reveals a ton of white space.
Screen Shot 2019-04-17 at 11 06 27 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions