Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification body text getting truncated #108

Closed
saytomanish82 opened this issue Aug 17, 2016 · 2 comments
Closed

Notification body text getting truncated #108

saytomanish82 opened this issue Aug 17, 2016 · 2 comments

Comments

@saytomanish82
Copy link

saytomanish82 commented Aug 17, 2016

When we send notification messages, its by default get shown in device tray(as expected). We have message body length of nearly 92 characters. When we try to view the message in device tray only first ~40 characters are being shown. Seems like message is not getting wrap in multiple lines.

We have tested the same behavior on Android phones having 5.1 and 6.0 versions.

screenshot_2016-08-17-14-38-57

My question is how we can show these messages with full length using "notification" payload only.

also as an alternate solution, we can think of having "data" payload and handle it there with custom notification service (as described in sample code), but there also we are stuck with detecting the scenarios that whether app is in foreground or background or killed.
Overall goal is to achieve functionality as below; -

  1. App is in Foreground: - we capture the notifications and display them in notification page(this is a page inside app).
  2. App is in background: - display messages in system tray. and when touched by user, app will get open.

Please let me know if we have any suggestions to implement the above requirement

message sent is (via Java code from server):

JSONObject info = new JSONObject();
info.put("sound", "default");
info.put("title", "My Test Title");   // Notification title
info.put("body", "Survey launched: [July 2016] MONTHLY SURVEY OF MANUFACTURING BUSINESS CONDITIONS IN IRELAND"); // Notification body

JSONObject json = new JSONObject();
json.put("to",<Device token for testing>);
json.put("notification", info);
json.put("content_available", true);
@kroikie
Copy link
Contributor

kroikie commented Aug 18, 2016

This should be fixed in SDK 9.4.0. Big Style notifications are used so there would be the option for the user to expand the notification if it is not expanded automatically.

@kroikie kroikie closed this as completed Aug 18, 2016
@ghost
Copy link

ghost commented Jun 12, 2017

is it implemented ?? I am getting this issue in latest SDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants