0
카메라 캡처 후 갤러리에 저장된 이미지의 경로를 가져나는 다음과 같은 코드를 사용하여 카메라를 개방하고
Intent captureImageIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
cordova.setActivityResultCallback(this);
cordova.getActivity().startActivityForResult(captureImageIntent,RESULT_CAPTURE_IMAGE);
와 내가 돌아갈 수 있도록 onActivityResult
안에 내가, 갤러리에 저장되어있는 path of the image
를 얻기 위해 노력하고 있어요 다시 웹 페이지로 이동합니다. 내가 시도 것을 여기
지금까지
Uri uri = intent.getData(); // doesnt work
내가 MediaStore.EXTRA_OUTPUT
을 사용하려고하지만,이 경우 내가 널 의도를 얻고있다.
captureImageIntent.putExtra(MediaStore.EXTRA_OUTPUT, mPhotoUri);
아무도 경로를 가져올 수 있습니까?
편집
String fileName = "temp.jpg";
contentValues values = new ContentValues();
values.put(MediaStore.Images.Media.TITLE, fileName);
Uri mPhotoUri = cordova.getActivity().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
mPhotoUri을받는 방법을 게시 할 수 있습니까? –
@HareshChhelana 수정 사항보기 – Hunt