标签:android
话不多说 直接上代码,
@SuppressLint("NewApi")
public static boolean isSupportFrontCamera() {
if (!hasGingerbread()) {
return false;
}
@SuppressWarnings("deprecation")
int numberOfCameras = android.hardware.Camera.getNumberOfCameras();
if (2 == numberOfCameras) {
return true;
}
return false;
}
public static boolean hasGingerbread() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD;
}
搞定
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:android
原文地址:http://blog.csdn.net/coderinchina/article/details/47658373