我正在尝试cameraFragment.this在片段中工作,但它一直告诉我“错误的第一个参数类型等”
public void dispatchPicTaken(){
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if(intent.resolveActivity(getActivity().getPackageManager()) !=
null){
File imgFile = null;
imgFile = createPhotoFile();
if(imgFile != null) {
pathToFile = imgFile.getAbsolutePath();
Uri photoURI =
FileProvider.getUriForFile(cameraFragment.this, "test", imgFile);
intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);
startActivityForResult(intent, 1);
}
}
}
交互式爱情
相关分类