Reputation: 470
I was wondering...
I've been able to create a styled notification on my android-wearable-device (using spannable-strings) while implementing it on a wearable-based app. (I used the SpannableStringBuilder class for that purpose).
Now, Whenever you create styled notifications on a phone-based app (using SpannableStringBuilder), they will show up on the wearable-device, but without the special styling...
Is there any way to achieve styled notifications on the wearable device with only a phone-based app?
Thanks.
Upvotes: 0
Views: 236
Reputation: 38
Most styling effects applied to notifications created on an handheld device will show up on both wearable and handheld devices.
Styling effects that will show up on WEARABLE and HANDHELD devices :
Styling effects that will show up on HANDHELD devices ONLY :
Upvotes: 2
Reputation: 609
The styling should show up on both. I have done it using the SpannableStringBuilder class and NotificationCompat.
Please refer to our sample under samples/android-20-wearable/Notifications. Take a look inside NotificationPresets in the Application module. It contains a private static class StylizedTextNotificationPreset and the method buildNotifications contains the code for stylised notifications.
One thing to note is color. In Holo, the default background is black whereas on Wear, the notification background is white. I find that colour tends to work well against one and not the other or vice versa so I would recommend using colour sparingly and maybe only stick to shades of grey. I hope this helps.
Upvotes: 1