android调用系统摄像头拍照图片和视频
如题:
?
@Overrideprotected void onActivityResult(int requestCode, int resultCode, Intent data) {try{if(resultCode==Activity.RESULT_OK){if(requestCode==CASE_CAMERA){typeMulti = 0; Bundle extras = data.getExtras();Bitmap bitmap= (Bitmap) extras.get("data");path = IOUtils.saveImg(bitmap); //返回图片保存在本机中的目录/*Toast toast=Toast.makeText(this, "相片已保存在:SDcard/DCIM/Camera目录中", Toast.LENGTH_LONG);toast.setGravity(Gravity.BOTTOM, 0, 0);toast.show();*/isUploadPhoto(bitmap);}if(requestCode==CASE_VIDEO){typeMulti = 1;path = data.getData().toString();/*Toast toast=Toast.makeText(this, "视频已保存在:"+path, Toast.LENGTH_LONG);toast.setGravity(Gravity.BOTTOM, 0, 0);toast.show();*/uploadVideoDialog();}}}catch(Exception e){e.printStackTrace();}}?