I'm working on an Apache Cordova based project. This project relies on access to certain device features, like access to the device
object.
This object will never exist when I'm debugging our application in a browser, because Cordova is not loaded.
When running in a browser, I would like to use certain mocks and dummy values to make debugging easier, but I don't know if the absence of device
is due to running in the browser, or due to a problem at runtime.
How can I determine if I'm currently running in a browser, an emulator or an actual device?