[英]WebView and front camera does not work on some Samsung devices
在我的 webview 應用程序中,我從 webview 打開相機拍照,然后上傳它們。 大多數設備都運行良好,但在三星 Galaxy 7 和三星 DUOS 上,后置攝像頭按預期工作,但拍照后前置攝像頭顯示如下:
要記住的是,如果我按下正在顯示的裁剪按鈕,則不會發生任何事情。
我使用以下代碼打開相機:
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);
}
以下是我的 onActivityResult:
@Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
if(requestCode == 13 && resultCode == RESULT_OK) {
Log.i(TAG, imageUri.toString());
}
}
此問題僅出現在三星設備上。
問題可能是:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.