mthoutai

话不多说 直接上代码,

@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;
   }

搞定

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-26
  • 2021-10-09
  • 2021-11-16
  • 2021-08-25
猜你喜欢
  • 2022-12-23
  • 2022-01-11
  • 2021-11-20
  • 2022-02-09
  • 2021-06-28
  • 2022-12-23
相关资源
相似解决方案