Installing Chris Brody’s SQLite Database with Cordova CLI (Android)


The HTML5 SQLite spec results in a database with a limit of 5MB. Chris Brody’s SQLitePlugin, however, breaks this barrier. Here is how to implement it. These steps assume you’ve already created the Cordova project and are adding this database project to it. I recommend you build for v19.

 If you just want a simple prepopulated DB, try this article instead. Continue reading

Advertisements

Easily Add Search Functions to Your App


I have been adding a Search function to my Cordova PhoneGap apps for a few years now. It is so easy that I want to share it with you who have wondered how to do the same. I use a product that works in Windows, and it creates a search database of all words in the HTML pages using Javascript. I’m using Zoom Search Engine 6.0 Professional Edition, available from http://www.wrensoft.com/zoom/Continue reading

Book review: PhoneGap Mobile Application Development Cookbook, by Matt Gifford


October 2012. Published by Packt Publishing Ltd. ISBN 978-1-84951-858-1.
Packt asked me to review the book, which I did in PDF format.

About the author: “A regular presenter at national and international conferences, Matt Gifford also contributes articles and tutorials in leading international industry magazines, as well as publishing on his blog (www.mattgifford.co.uk).”

This book functions as a cookbook, so it creates spare apps that do exactly what they set out to do and little else. As a result, there is no disc of complicated code included. The benefit of this approach is that you don’t get lost in the programming of a more fully functioning app. The cookbook format, however, means that you will get only little more explanation of the code than what you’ll see on PhoneGap’s site. So this is not a book for those already comfortable using the code on PG’s site. Continue reading

Installing Weinre remote debugger on the Mac OSX Lion


Weinre, which is short for Web Inspector Remote (pronounced “winery,” “wine-ray,” “whiner,” or “weiner,” depending on your native accent or sense of humor), allows us to debug our mobile app code remotely, that is, in a desktop browser window outside the mobile device. Why would we do this? Because checking our HTML/CSS/Javascript during development in a browser doesn’t necessarily mean it’ll run flawlessly in the target mobile device. The environments are different. Also, 9 times out of 10, the device has poorly integrated debugging of its own.

How steep is the learning curve for this tool? Well, if you are habiitually using Google Chromes’s Javascript Console (in Google Chrome, click on the wrench icon > Tools > Javascript Console), then you’ll quickly grasp this tool (which is WebKit’s Web Inspector), since they are the same tools, with the addition of one extra tab in Weinre for Remote.

Currently, Weinre, developed by Patrick Mueller, only works in Webkit-based browsers like Google and Safari, as used in iPhone and Android devices. Here are the steps to download and install the software tool, and get it running on an iPod touch device running an app which uses Cordova PhoneGap. These steps are extremely thorough, designed for newbies to coding. (You’re welcome.)

(Sept. 21, 2012 update: If you use a Mac, you may want to try the iWebInspector, which is more feature-rich and designed to replace Weinre on the Mac.) Continue reading

Saving localStorage to a more secure folder location


If you are worried whether your localStorage will persist after an iOS version upgrade or be backed up to iCloud, one coder, Kerri Shotts, has graciously given us a Javascript script that saves the localStorage data to a secure folder within iOS. Her code periodically saves localStorage data at set intervals. (This code has been updated. See bottom of article.) Continue reading

Book review: PhoneGap Beginner’s Guide, by Andrew Lunny


PhoneGap Beginner’s Guide, by Andrew Lunny

Packt Publishing, https://www.packtpub.com/

I’m reading the PDF version of this book, which displayed very nicely on Adobe Reader.

This book covers a lot of material (emphasis on “a lot”). This review will cover the breadth of this book’s content. It starts you at the beginning, with downloading PhoneGap and the Software Development Kits (SDKs) you’ll need to create and install applications for each of the mobile phone frameworks (Xcode for iPhone, Eclipse for Android, and Blackberry Webworks). We are introduced immediately to Git, ant, and Ruby, so we can start using them in our workflow.

Continue reading