0

알림 메시지를 받으려면 AccessibilityService을 추가했습니다.알림 URL을 가져 오는 방법은 무엇입니까?

이제 모든 알림 메시지가 표시됩니다.

내 질문 : 아래 코드의 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을 가져 오는 방법이 있습니까?

답변

0

아니요. PendingIntent에서 아무 것도 추출 할 수 없으므로 참조 된 Intent에서 ACTION을 가져올 수 없습니다.

관련 문제