Android的,得到响应的通知 [英] Android, get Notifications Responses

查看:154
本文介绍了Android的,得到响应的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何让Android通知快速反应?

Does anybody know how to get Android Notifications quick responses?

与图片示例:

我在开发用于发送通知到非Android Wear的SmartWatch(高通TOQ)的应用程序,我想补充的快速反应方案。我得到使用NotificationListenerService的通知,但我没有在任何地方找到这些快速反应。可能有人提出一个方法?

I'm Developing an app for sending notifications to a non Android Wear smartwatch (Qualcomm Toq), and I want to add those quick responses options. I get those notifications using NotificationListenerService, but I don't find those quick responses anywhere. Could someone suggest a way?

推荐答案

我一直在寻找里面StatusBarNotification行动,但他们在里面的通知对象StatusBarNotification:

I was looking for actions inside StatusBarNotification, but they are in the Notifications object inside StatusBarNotification:

@Override
public void onNotificationPosted(StatusBarNotification sbn) {
    Notification n = sbn.getNotification();
    for(Action action : n.actions){
        String title = action.title.toString;
        ...
    }
}

现在我希望能找到被点击的SmartWatch按钮时执行这些操作的方式。

Now I hope to find the way to execute those actions when the smartwatch button is clicked.

感谢大家!

这篇关于Android的,得到响应的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆