Start a Project

Handling Out Of Memory Exception to upload image from camera

There are some cases occur out of memory Exception when uploading an image from the camera, this happened because of no memory available to upload the image. So how we handle the Exception?

By using the BitmapFactory.Options class.

the following code to apply in our code when getting the result is Activity.RESULT_OK from the camera.

 

 

 

Exit mobile version