In my app, I\'d like to use the camera, if the device has one. Are there any devices running android that do not have a camera? By including the following into my m
As per the documentation, you have to use Package Manager to check if Camera is available on the device or not
In Java:
final boolean isCameraAvailable = getPackageManager().hasSystemFeature(FEATURE_CAMERA);
In Kotlin:
val isCameraAvailable = packageManager.hasSystemFeature(FEATURE_CAMERA)