Get the number of cameras that the android device owned. - Android Camera

Android examples for Camera:Camera Attribute

Description

Get the number of cameras that the android device owned.

Demo Code


//package com.java2s;

import android.hardware.Camera;

public class Main {
    /**//  w  w  w.j  a  v  a  2  s . c  o  m
     * Get the number of cameras that the android device owned.
     *
     * @return number of cameras.
     */
    public static int getNumberOfCameras() {
        return Camera.getNumberOfCameras();
    }
}

Related Tutorials