I had only created one Android app before and that was done in Java as a learning exercise. It was a great learning exercise but a poor app.
Having created the Munro Bagger website with other students from CodeClan, I wondered how easy it would be to create an app with the same functionality. For those not familiar with the term, a “Munro” is a mountain in Scotland with a height of 3000ft or more above sea level. The Munro Bagger website allows the user to review the weather on all 282 Munros to help them decided which peak to target and when. When our group was creating the website we felt that we needed a good solution for people on the move so an app seemed like a good idea.
When I started using Cordova, I ordered a couple of books by John M. Wargo: “Apache Cordova 4 Programming” and the companion book “Apache Cordova API Cookbook”. Good books and useful but, in the year and a bit since publication, Cordova has moved on to version 6 and the Cordova online documentation is pretty good. Nevertheless, the “API Cookbook” is still worth looking at for its example code.
When I first brought React-MDL and Cordova together everything looked great but as soon as I used Dialogs, everything went wrong. On older phone’s, Android’s built-in browser just can’t render Dialogs. I explored using polyfills but eventually found Crosswalk and Crosswalk is awesome!
A Cordova/Crosswalk app is fairly large, certainly much larger than a similar native app would be but the simplicity of migration from Web to app is impressive; it only took a few weeks to replace the UI of the Munro Bagger website with a React-MDL/Cordova/Crosswalk UI and that included a lot of exploration and problem solving. The total size of the Munro Bagger Android app is 27MBytes which is approximately half the 50MByte maximum size permitted by Google.
One other area of app development caused some head scratching and that was the handling of network outages – an app is bound to go offline sometime – but that’s a subject for another day.