【问题标题】:Notification Not Appearing On Watch通知未出现在手表上
【发布时间】:2016-12-02 23:16:05
【问题描述】:

我正在我的应用中创建以下通知:

        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 所需的代码是否缺少某些内容?它必须是发布签名的版本吗?我检查了设置,手表确实可以访问通知。

谢谢

【问题讨论】:

    标签: android android-notifications wear-os android-wear-notification


    【解决方案1】:

    如果您使用的是 Android 5.0,请确保中断设置未设置为 "None"

    Silence your device with "Do not disturb"

    【讨论】:

      猜你喜欢
      • 2012-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多