title: Android front camera
body: <p>I need ONE function to check if front camera exist, and if so - show preview.
  I found a few links, but each of them talk about a specific device:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/2779002/how-to-open-front-camera-on-android-platform">How do I open the &quot;front camera&quot; on the Android platform?</a></li>
  <li><a href="http://developer.android.com/reference/android/hardware/Camera.html#open(int" rel="nofollow noreferrer">http://developer.android.com/reference/android/hardware/Camera.html#open(int</a></li>
  <li><a href="https://stackoverflow.com/questions/5673725/front-facing-camera-on-lg-optimus-2x-speed">Front-facing camera on LG Optimus 2X Speed</a></li>
  <li><a href="https://stackoverflow.com/questions/4241292/how-to-use-front-facing-camera-on-samsung-galaxy-s">How to use Front Facing Camera on Samsung Galaxy S</a></li>
  </ul>
  
  <p>Can anyone provide a generic code for this? Or maybe a combined code that will work with all devices?</p>