2013/1/14 William Ferguson <[email protected]>:
> If it's an Android version specific limitation of chooser behaviour then I'm
> all ears, and I'll definitely go back and test on some old versions now. but
> there is nothing in the doco to suggest that.

I recently had a Play crash report from my app doing a startActivity,
caused by the resolved activity in another app not being exported.

The crash was attributed to my app (of course). The device was running 4.1.1

java.lang.SecurityException: Permission Denial: starting Intent {
act=android.intent.action.VIEW
dat=file:///mnt/sdcard/Download/<filename>.jpg typ=image/jpg
flg=0x80000 cmp=<app name removed> } from ProcessRecord{4192e9c8
20556:org.kman.AquaMail/u0a99} (pid=20556, uid=10099) not exported
from uid 10108
        at android.os.Parcel.readException(Parcel.java:1425)
        at android.os.Parcel.readException(Parcel.java:1379)
        at 
android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1761)
        at 
android.app.Instrumentation.execStartActivity(Instrumentation.java:1411)
        at android.app.Activity.startActivityForResult(Activity.java:3351)
        at android.app.Activity.startActivityForResult(Activity.java:3312)
        at android.app.Activity.startActivity(Activity.java:3522)
        at android.app.Activity.startActivity(Activity.java:3490)
        at <my code here>

Note that this is not an ActivityNotFoundException (which everyone
knows to catch) but an "unchecked" SecurityException.

-- K

>
> As stated before, my use case is that I want to share text/plain and have
> all relevant Activities available to respond, including my own Activity. But
> I don't want my own Activity to be able to respond to text/plain shared from
> another app.  Hence why android:exported=false sounds like the perfect
> solution.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to