title: Picture Size in Android Studio with Java
body: <p>This is a beginner question, so I apologize if it is very basic.  I have googled and searched, but the questions/answers I've found are far more complex than I am capable of understanding.   I am trying to make a camera app for Android in Android Studio.  I know I can access the default camera, but I need to do it from within the app.  </p>
  
  <p>So far my app does show a preview, and can take and save pictures successfully.</p>
  
  <p>I am following the camera API page here: <a href="https://developer.android.com/guide/topics/media/camera.html#custom-camera" rel="nofollow noreferrer">https://developer.android.com/guide/topics/media/camera.html#custom-camera</a></p>
  
  <p>I need to understand how to set the picture size.  For now I am okay with setting it directly/statically to 2048 x 1536.  </p>
  
  <p>This seems to be the correct command/function to use here: <a href="https://developer.android.com/reference/android/hardware/Camera.Parameters.html#setPictureSize(int" rel="nofollow noreferrer">https://developer.android.com/reference/android/hardware/Camera.Parameters.html#setPictureSize(int</a>, int)</p>
  
  <p>It gives me this:  void setPictureSize (int width, int height)</p>
  
  <blockquote>
    <p><strong><em>My question is</em></strong> -  where and how do I implement this?   (If I add "setPictureSize(2048,1536)" anywhere in my code, it turns up with a
    red line and says "cannot resolve method.")</p>
  </blockquote>
  
  <p>Is there some prefix, like "Camera.setPictureSize..." I don't see any option to import the required class/method.</p>