私は現在、摩耗デバイスに表示されている通知付きのアプリを開発中です。この通知には、通知カード(.setContentAction(0))にバインドされたアクションが含まれています。アンドロイドウェアの保留中のインテントアクションの確認を無効にする
すべてが、それは毎回誰かがカードをクリックし、確認メッセージが表示されていることを除いて、正常に動作しています。
3210
カードは、すぐに誰かがそれをクリックすると更新されるので、確認を表示する必要はありません。
確認を中止する方法がある場合は、公式の文書(https://developer.android.com/training/wearables/ui/confirm.html#show-confirmation)を既に確認していますが、残念ながらこれまで解決策が見つかりませんでした。
編集2015年7月9日
NotificationCompat.Builder builder = new NotificationCompat.Builder(context)
.setGroup("GROUP")
.setGroupSummary(false)
.setAutoCancel(false)
.setPriority(Notification.PRIORITY_HIGH)
.setSmallIcon(R.drawable.ic_timer_white_48dp);
ArrayList<NotificationCompat.Action> actions = new ArrayList<>();
NotificationCompat.Action control = new NotificationCompat.Action.Builder(icon, null, pendingTimeIntent).build();
actions.add(control);
builder.extend(new NotificationCompat.WearableExtender().addActions(actions).setContentAction(0).setBackground(background));
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(context);
notificationManager.notify(Constants.NOTIFICATION_ID_WEAR, builder.build());
これにはどんな解決策がありましたか? – Debugger
いいえ、そういうわけで私はバウンスを始めました。 – Lukas
スタンドアロンウェアラブルアプリケーションはありますか?私は最近、SmartWatchアプリを開発しましたが、この問題はありませんでした。いくつかのコードを投稿できますか? – Blackbelt