Android wear not show notification

心已入冬 提交于 2019-11-29 11:31:08

Make sure that you have given the Android Wear app on your device access to notifications.

In 4.4: Settings > Security > Notification Access
In L Preview: Settings > Sound & Notifications > Notification Access

Within the Notification access screen, make sure that Android Wear is checked.

On Android 7, go to: Settings > Apps > click cogwheel > Special Access > Notification access > Android Wear > click switch for Tasker. See screenshot.

Try this:

NotificationCompact.Builder notBuilder = 
                                   new NotificationCompact.Builder(this);
notBuilder.setContentTitle("Title").setContentText("Text");
WearableNotifications.Builder wearBuilder = 
                                 new WearableNotifications.Builder(notBuilder);
Notification not = wearBuilder.build();

NotificationManagerCompat manager = NotificationManagerCompat.from(this);
manager.notify(0,not);

I hope this will help you..

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!