0

I have added an AccessibilityService to get the notification messages.

And I do get all the notification messages now.

My Question is : Is there any way to get the action url in the PendingIntent in the below code?

 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();
            }


        }
    }

So is there any way to get the news URL from the PendingIntent?

AADProgramming
  • 6,077
  • 11
  • 38
  • 58

1 Answers1

0

No. You cannot extract anything from a PendingIntent, so you cannot get the ACTION from the referenced Intent.

David Wasser
  • 93,459
  • 16
  • 209
  • 274