调用系统相机拍照,拍照后获取照片

Intent:
Intent intent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
			startActivityForResult(intent, 1);


拍完照接收图片
@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		if (requestCode==1) {
			Bundle bundle=data.getExtras();
			if (bundle!=null) {
				
				Bitmap bm=(Bitmap) bundle.get("data");
				imageview.setImageBitmap(bm);
			}
			
		}
	}

你可能感兴趣的:(调用系统相机拍照,拍照后获取照片)