 <p>Write this lines of code in oncreate() </p> <pre><code> Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST); </code></pre>