Debug system diagram user modified Avatar, when the user select album pictures, and then call the system Diagram tool after Xiaomi phone directly quit the program, test MX Samsung are no problem
The following code is the most critical place
Intent.putextra (Mediastore.extra_output, Uri.parse (ImagePath)); Intent.putextra ("OutputFormat", Bitmap.CompressFormat.JPEG.toString ());
Public Static voidStartphotozoom (Context Context,uri uri,string ImagePath,intSizeintRequestcode) {Intent Intent=NewIntent ("Com.android.camera.action.CROP"); Intent.setdataandtype (URI,"Image/*"); //crop True is set to set the displayed view in the open intent can be clippedIntent.putextra ("Crop", "true"); //Aspectx Aspecty is the ratio of width to heightIntent.putextra ("Aspectx", 1); Intent.putextra ("Aspecty", 1); //Outputx,outputy is the width height of the cropped pictureIntent.putextra ("Outputx", size); Intent.putextra ("Outputy", size); Intent.putextra (Mediastore.extra_output, Uri.parse (ImagePath)); Intent.putextra ("OutputFormat", Bitmap.CompressFormat.JPEG.toString ()); (Activity) context). Startactivityforresult (Intent, Requestcode); }
Debug system Tangent Graph method in Onactivityresult method
Uri uri = data.getdata (); String name= Dateformat.format ("Yyyymmdd_hhmmss", Calendar.getinstance (Locale.china)) + Appconfig.imagetype; FileName=fileutils.getextpath () + "/" +appconfig.sd_dir+ "/" +name;
Put the picture in ImageView in the Onactivityresult method
if (requestcode==photoalbum_result) { fangdaimageloader.getinstance (). SetImage ("file:///" + filename, Img_photo); }
Xiaomi phone call system hangs up problem