In my webview app, I open camera from webview to take pictures and then upload them. Things go fine for most of devices but on Samsung Galaxy 7 and Samsung DUOS, back camera works as expected but front camera show following after I take picture:
Thing to remember is that nothing happens if I press crop button that is being displayed.
I use following code for opening camera:
private void openCam() {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
ContentValues values = new ContentValues();
values.put(MediaStore.Images.Media.TITLE, "Divine");
values.put(MediaStore.Images.Media.DESCRIPTION, "From your Camera");
imageUri = getContentResolver().insert(
MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
startActivityForResult(intent, 13);
}
Following is my onActivityResult:
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
if(requestCode == 13 && resultCode == RESULT_OK) {
Log.i(TAG, imageUri.toString());
}
}
This issue arises on Samsung devices only.
The issues may be that:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.