Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are two ways</p> <ol> <li><strong>Camera Intent</strong>.</li> <li><strong>Custom camera</strong>.</li> </ol> <p>You are using Camera Intent.</p> <blockquote> <p>new Intent(MediaStore.ACTION_IMAGE_CAPTURE);</p> </blockquote> <p><strong>MediaStore.ACTION_IMAGE_CAPTURE</strong>- Intent action type for requesting an image from an existing camera application. </p> <p><strong>MediaStore.EXTRA_OUTPUT</strong> - This setting requires a Uri object specifying a path and file name where you'd like to save the picture</p> <p>How To save <a href="http://developer.android.com/guide/topics/media/camera.html#saving-media" rel="nofollow noreferrer">media file</a>?</p> <pre><code>private static final int CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE = 100; private Uri fileUri; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // create Intent to take a picture and return control to the calling application Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE); // create a file to save the image intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the image file name // start the image capture Intent startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE); } </code></pre> <p>Please follow the above instruction correctly to avoid such duplicate.</p> <p>2nd option is You need to use <a href="http://www.mydoople.com/android-camera-example" rel="nofollow noreferrer">Custom Camera</a>.</p> <p>Please Read this full <a href="http://developer.android.com/guide/topics/media/camera.html" rel="nofollow noreferrer">article</a> to understand about the camera function. </p> <p><strong>Hint:</strong></p> <p>In your <strong>startActivityForResult()</strong> write the code to <a href="https://stackoverflow.com/questions/6588364/moving-files-in-the-sdcard">move the picture</a> from <strong>camera folder</strong> to your <strong>Custom folder</strong> instead of saving images in your custom folder.</p> <p>Hope this may give you some useful information.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload