ElizaChat の例に基づいて行った背景を表示することはできませんが、常に黒の背景を表示することはできません。
これが私のコードです:
public static void createNotification(Context context) {
int notificationId = 1;
NotificationCompat.BigTextStyle bigStyle = new NotificationCompat.BigTextStyle();
bigStyle.bigText("I am a big style message");
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(context)
//.setSmallIcon(R.drawable.ic_launcher)
.setContentTitle("hallo")
.setContentText("I am a message")
.setLargeIcon(BitmapFactory.decodeResource(
context.getResources(), R.drawable.clock_bg))
//.setStyle(bigStyle)
;
// Get an instance of the NotificationManager service
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
Notification notification =
new WearableNotifications.Builder(notificationBuilder)
.setHintHideIcon(true)
.setMinPriority() // show only on clock
.build();
// Build the notification and issues it with notification manager.
notificationManager.notify(notificationId, notification);
}
何か案が?
これは私の出力です: