Xiaomi phone call system screenshot hangs off the problem

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.