With the Android lib you'll always need to create the Handler yourself, so
we can't add it there.
We already had an extra 'title' element that you could use instead of the
app name, but yeah something like this might also be worth looking at. For
windows we also have special messages that have a lot of formatting.
On Fri, Aug 14, 2015 at 8:13 AM, Matthias Wessendorf <matzew(a)apache.org>
wrote:
I agree, would be for sure a nice option, even for the native Android
lib?
On Fri, Aug 14, 2015 at 7:54 AM, Sebastien Blanc <scm.blanc(a)gmail.com>
wrote:
> Hi !
>
> 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.
>
> Sebi
>
>
> On Fri, Aug 14, 2015 at 5:44 AM, Kelvin Lunsford <kelvin(a)qantel.com>
> wrote:
>
>> 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.
>>
>> 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.
>>
>> I coded up a change so I could test BigTextStyle in android. Using
>> BigTextStyle on android lets the text wrap to multiple lines.
>>
>> With the change I can use a UPS request like:
>> {
>> "alias":["someuser"],
>> "message":{
>> "alert":"a long message"",
>> "badge":33,
>> "gglbigtxt":"a long message",
>> "gglsummry":"unread count",
>> "gglinfo":"33"
>> }
>> }
>> to display wrapping messages in both android and ios. Adding a summary
>> line for the count value helps mitigate the missing badges on android.
>>
>> 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.
>>
>> In NotificationMessageHandler.java before the line:
>>
>> manager.notify(appName, NOTIFICATION_ID, builder.build());
>>
>> add:
>>
>> String tmp;
>> if ((tmp = extras.getString("gglbigtxt")) != null) {
>> NotificationCompat.BigTextStyle bigStyle = new
>> NotificationCompat.BigTextStyle().bigText(tmp);
>> if ((tmp = extras.getString("gglsummry")) != null)
>> bigStyle.setSummaryText(tmp);
>> if ((tmp = extras.getString("gglbigttl")) != null)
>> bigStyle.setBigContentTitle(tmp);
>> builder.setStyle(bigStyle);
>> }
>> if ((tmp = extras.getString("gglinfo")) != null)
>> builder.setContentInfo(tmp);
>>
>>
>> I'm not recommending this be added to the plugin project as is, but it
>> might be worth looking at.
>>
>> - Kelvin
>>
>> _______________________________________________
>> Aerogear-users mailing list
>> Aerogear-users(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/aerogear-users
>>
>
>
> _______________________________________________
> Aerogear-users mailing list
> Aerogear-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/aerogear-users
>
>
--
Matthias Wessendorf
blog:
http://matthiaswessendorf.wordpress.com/
sessions:
http://www.slideshare.net/mwessendorf
twitter:
http://twitter.com/mwessendorf
_______________________________________________
Aerogear-users mailing list
Aerogear-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-users