New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some mobile phone have a exception when take a picture。 #22
Comments
I would really love to help you here. The problem is I am not checking if the SDcard is preset of not. Here is a gist of how it should be handled. I can review and merge if you send me a PR. |
Thank you for your reply, but I now encountered a new problem, when I finished take a picture, time to enter, the photo album appeared two times before. |
Yes, I have noticed that on some phones. That is because image orientation is being corrected after taking the picture. Which device are you using? |
Mi(www.mi.com) phone at China ,perhaps you didn't hear about it , And other China Phone have same problem |
Yes. I know about Mi. We have a lot of buyers of Mi in India too. However, I cannot test on that device as I dont have the device with me. Capturing and storing the image may take time but does it crash other than what you have reported earlier? |
I tried several different ways to insert image,I think its may about with EXTERNAL_CONTENT_URI And |
Yes, defintely it is about that. So if the SDCard is mounted the image should be stored on EXTERNAL_CONTENT_URI otherwise if the device has sufficient storage, it should be stored on INTERNAL_CONTENT_URI. If the device does not have enough space, we should show some message to the user. |
you are right,Thank you code again, its very helpful for me. my english is not good.and thank you answer again. |
Welcome Jack. Submit a Pull Request when you are done editing the code. Please make sure you keep the code consistent. I will review and merge it. |
of course ,If I can solve this ,I have the honor of send a PR . |
👍 |
I tested the sample app that uses the latest version (vv1.0.11 at the time of writing) on Mi Redmi and found it working flawlessly. Anything specific I should do to reproduce the crash? Let me know, I will close the issue otherwise. |
Some mobile phone have a exception when take a picture。
java.lang.IllegalStateException: Unable to create new file: /storage/sdcard0/DCIM/Camera/1418805137509.jpg
cause this code :String path = MediaStore.Images.Media.insertImage(getActivity().getContentResolver(), bitmap, getPhotoFilename(), null);
I think this exception maybe with some mobile phone sdcard path diffenrent
could you help me to solve this question, thanks a lot.
The text was updated successfully, but these errors were encountered: