is Support Camera Led Flash - Android Camera

Android examples for Camera:Camera Flash

Description

is Support Camera Led Flash

Demo Code


//package com.java2s;

import android.content.pm.FeatureInfo;
import android.content.pm.PackageManager;

public class Main {

    public static boolean isSupportCameraLedFlash(PackageManager pm) {
        if (pm != null) {
            FeatureInfo[] features = pm.getSystemAvailableFeatures();
            if (features != null) {
                for (FeatureInfo f : features) {
                    if (f != null
                            && PackageManager.FEATURE_CAMERA_FLASH
                                    .equals(f.name)) 
                        return true;
                }//from  www.j  a  va2s . c om
            }
        }
        return false;
    }
}

Related Tutorials