PhuongFuk PhuongFuk -5 years ago 137
Android Question

How much size of file can be pass by Intent in Android?

I have problem with

. I use
transfer image have been made by camera (camera of device) to
, and then I show it. But it's too small. My camera is 8mpx.
so why and how can I fix it?

Answer Source

Could you be more specific, Is the photo taken directly from camera or selected from gallery? Most probably the size of the imageView itself is small. A photo no matter how small can be enlarged to fit a large imageView but it will pixelate.

If you have its URI you could try this code to convert data from intent to uri which then gets converted to bitmap and then assigned to your imageView

Uri imageUri = intent.getData();
Bitmap bitmap =     MediaStore.Images.Media.getBitmap(this.getContentResolver(),imageUri);
Imageview imgview1 = (Imageview ) findViewById (;

You could use the above code to convert URI recieved from camera to a bitmap and assign it to the imageView. If the image still looks small then check the size of the imageView.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download