title: Samsung Galaxy S: How to determine presence of front-facing camera?
body: <p>I know that we can access the front-facing camera on pre-Gingerbread Galaxy S devices by setting the <code>"camera-id"</code> Camera parameter:</p>
  
  <pre><code>Camera cam = Camera.open();
  Camera.Parameters params = cam.getParameters();
  params.set("camera-id", 2);
  </code></pre>
  
  <p>The problem is, not all Galaxy devices have a front-facing camera. These devices DO have <code>"camera-id"</code> parameter, AND it allows me to set it to 2 (front). As far as I have found, the only way to determine presence/absence of FFC is to see if <code>startPreview()</code> throws an exception when <code>"camera-id"</code> is 2. This is kind of an awkward fix especially when I'm trying to support multiple devices.</p>
  
  <p>Has anyone found a way to query the number of cameras on a 2.1 or 2.2 Galaxy S, or at least determine the presence of a front-facing camera?</p>
  
  <p>Thanks!</p>