Android SecurityException on PDF Send Intent

六眼飞鱼酱① 提交于 2019-12-30 05:16:25

问题


I'm getting the following exception during an ACTION_SEND intent with a data type application/pdf:

java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.SEND typ=application/pdf flg=0x3080000 cmp=com.adobe.reader/.ARSendForSignature (has extras) }

This brings up a dialog to choose the desired application to receive the PDF. I believe the SecurityException is being thrown when a user chooses Adobe Reader from the list, although it appears to be opening specifically the ARSendForSignature activity.

Any ideas?


回答1:


You are encountering a bug in the Adobe Reader app, or a bug in Android, depending upon your perspective.

The Adobe Reader ARSendForSignature activity supports the ACTION_SEND <intent-filter>, but they explicitly have android:exported="false", which denies anyone but them the ability to start that activity.

Either:

  1. Adobe Reader should not have that <intent-filter>, or
  2. Adobe Reader should not have marked it as not exported, or
  3. The Android chooser should filter out non-exported activities

Long-term, the answer should be #3 -- I'll work on reproducing this problem and will file an issue, assuming there isn't already one. Short-term, Adobe can fix this faster than we can fix a couple hundred million devices. :-)



来源:https://stackoverflow.com/questions/10319928/android-securityexception-on-pdf-send-intent

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