Android examples for android.hardware:Camera ID
get Camera id array
import android.hardware.Camera; public class Main { public static int[] getCameraIds() { int count = Camera.getNumberOfCameras(); int[] idArray = new int[count]; for (int i = 0; i < count; i++) { idArray[i] = i;/*from w w w . j a v a 2 s . c o m*/ } return idArray; } }