Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Simple Developer
Simple Developer
카메라 촬영 액티비티를 호출하고 onActivityResult() 함수를 통해 찍힌 이미지에 접근하는 소스
[code lang=”java”] Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(i, 1004); [/code]
[code lang=”java”] protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 1004 && resultCode == RESULT_OK) {
try { Bitmap profileBitmap = (Bitmap) data.getExtras().get(“data”);
ImageBox.setImageBitmap(profileBitmap); ImageBox.setScaleType(ImageView.ScaleType.FIT_XY); } catch (Exception e) {
} } } [/code]