I'm trying to display an emoji on notification bar.
Here is my string:
"\ue057 " + getString(R.string.notification_sent_hey)
I've already tried using the softbank, and every format possible: "U+1F601", "\xF0\x9F\x98\x81"
What should I do?
Thanks.
You can't do it like that. Notifications have a layout, and you are forced to use that layout.
A big icon, text, and a little icon. That's it. It's quite clearly stated here: http://developer.android.com/design/patterns/notifications.html
So, you can follow the example explained here: http://developer.android.com/training/wearables/notifications/creating.html
For example:
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_event)
.setContentTitle(eventTitle)
.setContentText(eventLocation)
.setLargeIcon(R.drawable.ic_event2);
.setContentIntent(viewPendingIntent);
// Get an instance of the NotificationManager service
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
// Build the notification and issues it with notification manager.
notificationManager.notify(notificationId, notificationBuilder.build());