Exploring the Device API
Since we have covered the basics of using plugins in a Cordova/PhoneGap project, we will now look at an example of how to use the Device plugin.
Device API is one of the simplest APIs of PhoneGap/Cordova, which provides you with details about the device on which it's running. This is a great API to try when you first learn about plugins. Using the API, you can get the following properties of the device:
- Device platform
- Device unique ID
- Device version number
- Device model name
You can use these properties to provide device-specific features to the users.