How can I figure out if the camera is enabled or disabled for my application (in the device's settings)?
My goal is to display a custom message in case the camera is disabled.
I am using Cordova/Phonegap 6.0.4.
Assuming by "figure out if the camera is enabled or disabled for my application" you mean "is the camera authorized for use by my application" (as it's not possible to "disable" the camera on Android or iOS), you can use cordova-diagnostic-plugin to do this:
First install it:
$ cordova plugin add cordova.plugins.diagnostic
Then use it:
cordova.plugins.diagnostic.isCameraAuthorized(function(authorized){
if(!authorized){
// Display some message to user
}
}, function(error){
console.error("The following error occurred: "+error);
});