Does anyone know how we can add text, to the right of the app’s name in a notification and before the timestamp(when)?
in Notification.Builder there is a method called setSubText().
You can pass the message to display as String.
Link to documentation : https://developer.android.com/reference/android/app/Notification.Builder.html#setSubText(java.lang.CharSequence)
Notification noti = new Notification.Builder(mContext)
.setContentTitle(AppName)
.setContentText(message)
.setSmallIcon(R.drawable.logo)
.setSubText(senders_mail)
.build();
Tags: androidandroid, text