title: How to set Android default camera app for portrait orientation only
body: <p>In my android application I am capturing photo using <code>Android default camera</code> for this purpose I have used below code.after captured a photo I have shown that Image into another activity in full screen mode.if I captured image in <code>portrait</code> mode I can set the whole image into full screen mode. it showed good, after showed a image I can perform my operation.But if I captured a photo from <code>landscape</code> the taken image would set in screen with stretched. so I would like to capture photo using portrait mode only not in landscape. so how may I lock camera app only for portrait.  </p>
  
  <pre><code>String fileName = "Camera_Example.jpg";                
      ContentValues values = new ContentValues();                
      values.put(MediaStore.Images.Media.TITLE, fileName);                
      values.put(MediaStore.Images.Media.DESCRIPTION,"Image capture by camera");                
      imageUri = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);                       
      Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
      intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
      intent.putExtra(MediaStore.EXTRA_SCREEN_ORIENTATION,ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);   
      startActivityForResult(intent,CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE); 
  </code></pre>
  
  <p><strong>AndroidManifest.xml</strong>     </p>
  
  <pre><code> &lt;activity
       android:name=".TestActivity"
       android:screenOrientation="portrait"
       android:configChanges="orientation"
       android:theme="@android:style/Theme.NoTitleBar" &gt;
       &lt;/activity&gt;
  </code></pre>
  
  <p>portrait captured photo<img src="https://i.stack.imgur.com/YpDP4.png" alt="enter image description here"></p>
  
  <p>portrait captured photo full screen<img src="https://i.stack.imgur.com/A1AeX.png" alt="enter image description here"></p>
  
  <p>landscape captured photo<img src="https://i.stack.imgur.com/gbol9.png" alt="enter image description here"></p>
  
  <p>landscape captured photo full screen<img src="https://i.stack.imgur.com/QoXzG.png" alt="enter image description here"></p>