<div dir="ltr">I agree, would be for sure a nice option, even for the native Android lib?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 14, 2015 at 7:54 AM, Sebastien Blanc <span dir="ltr"><<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi !<div><br></div><div>Thanks a lot for this tip and indeed I think it's worth a discussion to see if we could add some of these (android specific) keys to our sender API.</div><div><br></div><div>Sebi</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 14, 2015 at 5:44 AM, Kelvin Lunsford <span dir="ltr"><<a href="mailto:kelvin@qantel.com" target="_blank">kelvin@qantel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On ios the message text wraps when a long message is displayed but on android only one line is displayed by default, truncating if too long.<br>
<br>
In a previous thread Erik pointed out that there is a lot of freedom for how messages are displayed in the Android notifications panel by making changes to NotificationMessageHandler.java.<br>
<br>
I coded up a change so I could test BigTextStyle in android. Using BigTextStyle on android lets the text wrap to multiple lines.<br>
<br>
With the change I can use a UPS request like:<br>
{<br>
"alias":["someuser"],<br>
"message":{<br>
"alert":"a long message"",<br>
"badge":33,<br>
"gglbigtxt":"a long message",<br>
"gglsummry":"unread count",<br>
"gglinfo":"33"<br>
}<br>
}<br>
to display wrapping messages in both android and ios. Adding a summary line for the count value helps mitigate the missing badges on android.<br>
<br>
I added the "gglinfo" key to display any value in the info area. The "msgcnt" key displays in the info area but will not display a number less than 1.<br>
<br>
In NotificationMessageHandler.java before the line:<br>
<br>
manager.notify(appName, NOTIFICATION_ID, builder.build());<br>
<br>
add:<br>
<br>
String tmp;<br>
if ((tmp = extras.getString("gglbigtxt")) != null) {<br>
NotificationCompat.BigTextStyle bigStyle = new NotificationCompat.BigTextStyle().bigText(tmp);<br>
if ((tmp = extras.getString("gglsummry")) != null)<br>
bigStyle.setSummaryText(tmp);<br>
if ((tmp = extras.getString("gglbigttl")) != null)<br>
bigStyle.setBigContentTitle(tmp);<br>
builder.setStyle(bigStyle);<br>
}<br>
if ((tmp = extras.getString("gglinfo")) != null)<br>
builder.setContentInfo(tmp);<br>
<br>
<br>
I'm not recommending this be added to the plugin project as is, but it might be worth looking at.<br>
<br>
- Kelvin<br>
<br>
_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>
</div>