Skip to content

Instantly share code, notes, and snippets.

@choiboi
Created August 8, 2013 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save choiboi/6188195 to your computer and use it in GitHub Desktop.
Save choiboi/6188195 to your computer and use it in GitHub Desktop.
// Create a new File object with specified filepath, where the
// captured image will be located.
File file = new File(getOutputLink(TEMP_JPEG_FILENAME));
Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));
startActivityForResult(cameraIntent, CAMERA_WITH_FILEPATH);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment