我正在我的应用程序中创建以下通知:
int notificationId = 001;
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.mipmap.icon)
.setContentTitle(StationUtils.getStationModeString("My Notification")
.setContentText("Good Notification");
NotificationManager mNotifyMgr =
(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
mNotifyMgr.notify(notificationId, notificationBuilder.build());
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(MainActivity.this);
notificationManager.notify(notificationId, notificationBuilder.build());
它出现在我的手机上,但它没有出现在连接到手机的手表上。Android Wear 所需的代码是否缺少某些内容?它必须是发布签名的版本吗?我检查了设置,手表确实可以访问通知。
谢谢