.fromFile(new File(Environment
.getExternalStorageDirectory(), "camera.jpg")));
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Hide the window title. requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.main); p_w_picpathView = (ImageView) this.findViewById(R.id.preview); Button button = (Button) this.findViewById(R.id.cameraButton); button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent("android.media.action.IMAGE_CAPTURE"); intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri .fromFile(new File(Environment .getExternalStorageDirectory(), "camera.jpg"))); intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0); startActivityForResult(intent, 0); } }); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == 0 && resultCode == Activity.RESULT_OK) { this.p_w_picpathView.setImageDrawable(Drawable.createFromPath(new File( Environment.getExternalStorageDirectory(), "camera.jpg") .getAbsolutePath())); // for(String s:bundle.keySet()){ // Log.v("cam.demo", s); // } Log.v("cam.demo", "====>" + data); } } }