0

我添加了一个AccessibilityService来获取通知消息。

我现在确实收到了所有通知消息。

我的问题是:有没有办法在下面的代码中获取 PendingIntent 中的操作 url?

 if (event.getEventType() == AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED) 
    {

            Parcelable data = event.getParcelableData();
            if (data instanceof Notification) {


            Notification notification = (Notification) data;
            PendingIntent nit = notification .contentIntent;
           try {
                //after i invoke nit.send, it will goto the target app and open the right news.
                nit.send();
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }


        }
    }

那么有没有办法从 PendingIntent 中获取新闻 URL 呢?

4

1 回答 1

0

不,您无法从 中提取任何内容PendingIntent,因此您无法从引用的 中获取 ACTION Intent

于 2015-01-26T17:41:56.383 回答