Note that there are some explanatory texts on larger screens.

plurals
  1. POCropping Picture on Droid X sets resulting image as wallpaper
    text
    copied!<p>I'm running into an issue with my program when trying to crop an image selected by the user from their gallery. The issue so far only appears when running on a Droid X, as running on the original moto Droid works fine. </p> <p>Basically the issue occurs as the cropping intent is being run. Once the user crops the photo and clicks the save button, it replaces the wallpaper on the main screen with the cropped image that was saved! It does not do this on the moto droid, or emulators. Below is the code for cropping and saving the picture to the SD card:</p> <pre><code>@Override public void onActivityResult(int requestCode,int resultCode,Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode ==1){ if (resultCode == Activity.RESULT_OK) { Intent i = new Intent("com.android.camera.action.CROP"); i.setData(data.getData()); i.putExtra("noFaceDetection", true); i.putExtra("outputX", 80); i.putExtra("outputY", 80); i.putExtra("aspectX", 1); i.putExtra("aspectY", 1); i.putExtra("scale", true); if(selectedImageString == null){ ContentValues values = new ContentValues(); values.put(android.provider.MediaStore.Images.Media.TITLE, "Temp_Icon1"); values.put(android.provider.MediaStore.Images.Media.BUCKET_ID, "Temp_Icons"); values.put(android.provider.MediaStore.Images.Media.BUCKET_DISPLAY_NAME,"Temp_Icons"); values.put(android.provider.MediaStore.Images.Media.IS_PRIVATE, 1); selectedImageString = getContentResolver().insert(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values).toString(); } i.putExtra("output", Uri.parse(selectedImageString)); startActivityForResult(i, 2); } } if(requestCode == 2){ if (resultCode == Activity.RESULT_OK){ uriPath = Uri.parse(selectedImageString); imageView.setImageURI(uriPath); } } } </code></pre> <p>Can someone please help me with this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload