Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8188085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:47:10+00:00 2026-06-07T02:47:10+00:00

I have my main project which gets images from certain sources (returns Uri). The

  • 0

I have my main project which gets images from certain sources (returns Uri). The next step was to crop the image to scale (touch input). I recently found out that some phone manufacturer mess around with the android base classes so:

com.android.camera.action.crop 

doesn’t always exist.

So I’ve found a library that does cropping: https://github.com/lvillani/android-cropimage
I’ve added the library into my eclipse build path and project library’s.

my question is, can I open the library like so:

    Intent intent = new Intent("com.android.camera.action.CROP");  
    //intent.setClassName("com.android.camera", "com.android.camera.CropImage"); 
    intent.setDataAndType(uri, "image/*");
    intent.putExtra("crop", "true");
    intent.putExtra("output", Uri); 
    intent.putExtra("outputFormat", "JPEG");
    startActivityForResult(intent, 1);  

And then retrieve the cropped image or do I have to do something else extra?

  1. Another question: Also will this effect my app when I put it onto market (will the user need to download or accept permission for the extra library?

I want to make sure that my app works on everything, so is this the best way of doing it? Or is there better methods, please explain. (Also keep it simple, fairly new to Android dev!, thanks!)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:47:11+00:00Added an answer on June 7, 2026 at 2:47 am

    I installed the library and made sure it was linking to my project and was in the build path, then I simply did:

    Open file manager:

            Intent intent = new Intent();
            intent.setType("image/*");
            intent.setAction(Intent.ACTION_GET_CONTENT);
            startActivityForResult(Intent.createChooser(intent,"Select Picture"), PICK_FROM_FILE);
    

    Alternatively if you want to capture from camera

            Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
            intent.putExtra("return-data", true);
            startActivityForResult(intent, GET_IMAGE_FROM_CAMERA);
    

    Then crop image:

        Intent intent = new Intent(this, com.android.camera.CropImage.class);
        intent.setData(uri);
        intent.putExtra("return-data", true);
        startActivityForResult(intent, CROP);
    

    I’ve tested this on a few devices and it’s working fine and dandy. Also works with camera.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one main project and another project which is added as a subprojects.
I have a large XAML project which will have a main TabControl and each
I have a project in which i have the following files main.wxs - directory
I have a main project, which includes a nested library project which produces a
I have been working on a project which is about data copy from one
I have a lagacy project (vb6) which has several reports (.rpx) next to the
We have one main project and two subprojects. One of the subprojects is the
We have a main visual studio project stored in SVN using the standard trunk/branches/tags
I have a Visual Studio solution containing 2 project: main project and test (via
I have an ASP.NET application with a <codeSubDirectories> section in web.config. My main project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.