is Support Camera Hardware - Android Camera

Android examples for Camera:Camera Feature

Description

is Support Camera Hardware

Demo Code


//package com.java2s;

import android.content.Context;

import android.content.pm.PackageManager;

public class Main {

    public static boolean isSupportCameraHardware(Context context) {
        if (context != null
                && context.getPackageManager().hasSystemFeature(
                        PackageManager.FEATURE_CAMERA)) {
            // this device has a camera
            return true;
        } else {/*from  w w  w  . j av  a 2s.com*/
            // no camera on this device
            return false;
        }
    }
}

Related Tutorials