Skip to content

Instantly share code, notes, and snippets.

@skayred
Created November 24, 2011 08:00
Show Gist options
  • Select an option

  • Save skayred/1390865 to your computer and use it in GitHub Desktop.

Select an option

Save skayred/1390865 to your computer and use it in GitHub Desktop.
public void getPhoto(View view) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
captureFile = new File(DirectoryManager.getTempDirectoryPath(this), "Capture.jpg");
captureUri = Uri.fromFile(captureFile);
intent.putExtra(MediaStore.EXTRA_OUTPUT, captureUri);
Log.e(TAG, captureFile.getAbsolutePath().toString());
Log.e(TAG, captureUri.toString());
startActivityForResult(intent, CAPTURE_IMAGE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment