If you want to customize only text, you can use SpannableString. It allows you to change the color, background, align the text of the header / content.
if you want to create a completely different notification, you need to implement smth-like in your wear project
Intent notificationIntent = new Intent(context, WearNotificationActivity.class); PendingIntent pendingNotificationIntent = PendingIntent.getActivity(context, 0, notificationIntent,PendingIntent.FLAG_UPDATE_CURRENT); Notification notification = new Notification.Builder(context) .setSmallIcon(R.drawable.ic_launcher) // .setContentTitle("CustomNotification") .extend(new Notification.WearableExtender() .setDisplayIntent(pendingNotificationIntent) .setCustomSizePreset(Notification.WearableExtender.SIZE_LARGE) .setStartScrollBottom(false) .setHintHideIcon(true)) .build(); NotificationManager notificationManager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE); notificationManager.notify(0, notification);
where WearNotificationActivity is the activity container of your custom view.
NOTE: you need to use .setSmallIcon(..)
, even if you do not need it. It seems that the error is Google, but without this notification the line will not be displayed.
and install
android:allowEmbedded="true" android:taskAffinity=""
for your activity container
source share