http://gqdy365.iteye.com/blog/1520173
http://www.devdiv.com/android_%E6%8B%8D%E7%85%A7%E8%8E%B7%E5%BE%97%E7%9A%84%E7%85%A7%E7%89%87%E5%A4%AA%E5%B0%8F%E5%A4%AA%E5%A8%87%E6%B0%94_%E7%9A%84_%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95-weblog-186998-8732.html
private String newCapturePhotoPath ;private void openCamera(){ Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); //用日期作为文件名,确保唯一性 Date date = new Date(); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss"); //拍完照片之后保存的路径(文件名) newCapturePhotoPath = 文件夹路径+ "/+"+ formatter.format(date) + ".jpg"; //加上这个后,图片就不会被压缩变小了 intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(newCapturePhotoPath))); startActivityForResult(intent, 0);}// 拍照结束后执行@Overrideprotected void onActivityResult(int requestCode, int resultCode, Intent data){ //拍照后 点击确认 result==-1 ,点击取消result==0 if (resultCode == -1) { //newCapturePhotoPath即为刚刚拍到的照片的地址,你可以为所欲为了 }}
好用