Kruy Vanna created CB-919:
-----------------------------
Summary: Camera Plugin returned with empty error message.
Key: CB-919
URL: https://issues.apache.org/jira/browse/CB-919
Project: Apache Cordova
Issue Type: Bug
Components: Android
Affects Versions: 1.8.0
Environment: Android AQUOS PHONE.
Android Version: 2.3.5
Build No: 01.00.01
NO SD CARD Mounted
Reporter: Kruy Vanna
Assignee: Joe Bowser
the queryImgDB() method returned null
-> the exception is raised but empty message is shown to the user.
public void takePicture(int returnType, int encodingType) {
// Save the number of images currently on disk for later
this.numPics = queryImgDB().getCount();
// Display camera
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
// Specify file so that large image is captured and returned
// TODO: What if there isn't any external storage?
File photo = createCaptureFile(encodingType);
intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
Uri.fromFile(photo));
this.imageUri = Uri.fromFile(photo);
this.ctx.startActivityForResult((Plugin) this, intent, (CAMERA+1)*16 +
returnType+1);
}
// This could return null in some android phones
private Cursor queryImgDB() {
return this.ctx.getContentResolver().query(
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
new String[] { MediaStore.Images.Media._ID },
null,
null,
null);
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira