I had the same problem. The CROP activity worked on 1.6 but not on
2.1. The fix turned out to be an easy one. In 1.6, I defined the
activity as
Intent intnt = new Intent("com.android.camera.action.CROP");
intnt.setClassName("com.android.camera",
"com.android.camera.CropImage");
Here, I'm specifying the class for the activity instead of relying on
the intent filter. I had no good reason for doing this. I got this
code snippet from some tutorial some place and it worked so I never
bothered to think about it. In 2.1 however, it looks like they moved
the CropImage class, which is why the code above fails. But the fix
is trivial -- don't specify the class. Works on both 2.1 and 1.6.
Intent intnt = new Intent("com.android.camera.action.CROP");
//intnt.setClassName("com.android.camera",
"com.android.camera.CropImage");
Anton
On Mar 26, 2:08 am, Paul Tongyoo <[email protected]> wrote:
> UPDATE: Romain Guy confirmed the CROP intent-filter still exists in Eclair,
> just moved to the Gallery.git manifest. HTH
>
> On Tue, Mar 23, 2010 at 2:13 PM, Streets Of Boston
> <[email protected]>wrote:
>
> > This has been working for me, at least on a Droid, G1 and Nexus1:
>
> > final Intent intent = new Intent("com.android.camera.action.CROP");
> > intent.setData(mImgUris[1]);
> > intent.putExtra("noFaceDetection", false);
> > //intent.putExtra("outputX", width);
> > //intent.putExtra("outputY", height);
> > //intent.putExtra("aspectX", width);
> > //intent.putExtra("aspectY", height);
> > //intent.putExtra("scale", true);
> > //intent.putExtra("output", Uri.parse("file:/" +
> > mFile.getAbsolutePath()));
> > startActivityForResult(intent, R.id.view_image_menu_crop);
>
> > On Feb 13, 3:05 pm, Adarsh Pandey <[email protected]> wrote:
> > > Hi,
>
> > > We are facing problem with cropimage activity, is there any changes?
> > > it gives error related to permission.
>
> > > java.lang.SecurityException: Permission
> > > Denial: starting Intent { act=android.intent.action.EDIT
> > > dat=content://
> > > media/external/images/media/12 cmp=com.android.camera/.CropImage (has
> > > extras) } from ProcessRecord{43b72040 374:com.abc/10028} (pid=374,
> > > uid=10028) requires null
>
> > --
> > 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]<android-developers%[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> > To unsubscribe from this group, send email to android-developers+
> > unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> > ME" as the subject.
--
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
To unsubscribe from this group, send email to
android-developers+unsubscribegooglegroups.com or reply to this email with the
words "REMOVE ME" as the subject.