Apache Cordova “Hello World” meets the real world
Last week I ran
cordova create and got out a fully functional “Hello World” application, which was cool to see running for the first time. However, I didn’t learn anything. So this weekend I wrote an “Advanced Hello World” application for Apache Cordova. My goal was to more properly emulate a real world mobile application that you’d write with Cordova. If you look at the README file, you can see that I noted the additions I’ve made.
- AJAX Request — Getting data from APIs for your app is a core piece of functionality for most mobile apps, so a sample request has been included.
cordova-plugin-statusbar— By default Cordova’s view space takes up 100% of the screen, but doesn’t turn off the status bar (which is a really bad default, oh well). So the statusbar plugin helps you fix that problem properly (rather than hacking in some margins).
cordova-plugin-geolocation— There are a lot of plugins for Cordova, to use various extra technologies and to use all the mobile hardware, so it’s fairly important to know how to use them.
cordova-plugin-console— Without this, you can’t see
console.logoutput in iOS or Android