Cordova Android project from start to finish — quick version of workflow


Here’s a cheat sheet for creating a Cordova app from start to finish. No details on this page; they’re all covered elsewhere on my site. My environment for this is a PC machine with Windows 7 Pro, and this is building an Android project. I’m not using Eclipse or Android Studio — they are not needed. Continue reading

Displaying a prepopulated database with AngularJS


I am trying out different ways to have a prepopulated database in an app. This time I’m experimenting with AngularJS. The following article show how to display an array of data AngularJS style, filtering the output with two buttons. (This article is not using “ng-cordova.”) If you follow the other articles on this site, you can compare the different approaches for a “simple,” in-app, prepopulated DB. Continue reading

Prepopulated Database with TaffyDB for iOS and Android with Cordova


I thought I would look for an alternate to SQLite to display a prepopulated database. Research (and successfully creating a working version) led me to TaffyDB. Here is a working project to create your own prepopulated DB. TaffyDB can do so much more if you are familiar with JavaScript (I’m not, so it was difficult trying to figure this much out!).

Resources:
http://www.taffydb.com/
http://www.slideshare.net/typicaljoe/better-data-management-using-taffydb-1357773  Continue reading

PhoneGap Desktop App Beta


The coolest thing about the PhoneGap Desktop app is that it uses the PhoneGap Developer app to update the app across all of your devices at once as you make changes on the desktop. Just download the PhoneGap Developer app to each of your test devices and with a few simple steps it will mirror your changes on the desktop.

This app is still in its infancy. You still need to use the CLI (Terminal commands) to do the heavy lifting. However, the developer feedback section on GitHub is in full swing as new features are being added every week.

Note that this app uses Adobe PhoneGap commands, not Cordova. Continue reading

Setting Up Your Development Environment for Cordova Android projects


Updated 8/2/2015 to include Windows 7 setup. Adobe PhoneGap/Apache Cordova CLI quickly sets up your project files for the mobile environment. However, it requires a hefty setup of your development environment before you can begin making Android apps. If you are a working developer, all these tools are par for the course and you’ll have them already installed. If you are trying out Cordova/PhoneGap for the first time, and you are new to the programming world – welcome! – you need to install all the “dependencies” that Cordova/PhoneGap assumes are already resident on your system. Follow all these steps to make your Cordova/PhoneGap work go smoothly. Of course, these steps need to be done just once. Continue reading

News: Cordova, iPhone 6, and iOS 8


Shazron of Adobe System’s Inc. gives us the latest news about Cordova and Apple’s release of iOS 8. Here’s what we need to change to get our apps ready for iOS 8:

http://shazronatadobe.wordpress.com/2014/09/18/cordova-ios-and-ios-8/

More news:
http://sdtimes.com/guest-view-hybrid-app-developers-love-new-ios-8/
http://www.sitepoint.com/getting-app-ready-ios-8/

Nov. 25, 2014 Need to upgrade iOS apps with Cordova older than 3.4.1 before Feb. 2015: http://cordova.apache.org/announcements/2014/11/25/ios-64bit.html

Continue reading

Using the Ionic Framework UI Elements


Ionic has many useable UI elements, including lists, buttons, forms and form elements, and so on. Ionic is both a CSS framework and a Javascript UI library. You can use them as is in your HTML. In this article, I’ll show you how to incorporate these elements as straight HTML code. I won’t be going into the more high-end, dynamic aspects of the Ionic framework in this article.

This tutorial assumes you already have installed:
node.js (http://nodejs.org/)
Cordova PhoneGap (http://www.phonegap.com)

This tutorial assumes you:
1. Know how to set up Android and iOS SDKs for development, and setting PATH statements. See my other articles on how to do this.
2. Have created several basic Cordova PhoneGap projects, including adding InAppBrowser plugin and making config.xml changes for it. Continue reading

Updating and Reverting to Different Apache Cordova Versions


If you want to update your version of Cordova to the latest version, or you want to revert to an earlier version (to test or debug), here are the steps to follow. I also have instructions on updating the plugins and platform versions here.

Resource:
https://github.com/apache/cordova-docs/blob/master/docs/en/5.0.0/guide/cli/index.md

Cordova blog for latest updates:
http://cordova.apache.org/blog/

Continue reading

Notes About Using PhoneGap Build


This is not a tutorial, but a list of things a Cordova PhoneGap developer needs to know if he or she wants to start using PhoneGap Build (PGB). PGB will take your www/ assets and create the files needed for iOS, Android, and Windows devices. It doesn’t use native files, such as those ending in .h, .m, .java, etc.; the build may fail if these are included. What follows are the notes I took as I considered whether to use the service. Read this as a FAQ page for preparing an app for PGB. Curious as to whether PhoneGap Build is for you? Read on…

Main site: https://build.phonegap.com/  Continue reading

App testing with the PhoneGap Developer App — see your changes instantly without re-building!


With this software, you can develop your app on the desktop, then see the changes instantly on your mobile device. There’s no need to re-sign, re-compile, or reinstall your app to test your code. You’ll have access to the device APIs that aren’t available in web browsers. Let’s give it a spin!

For more info:
http://phonegap.com/blog/2014/04/23/phonegap-developer-app/  Continue reading

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

Populate your PhoneGap App with Data from an External Server DB


With this article, we’ll pull data from a server and show it in the app. We’ll create a database table on a server, load it with data, then set up the scripts to make it all work. You’ll need a MySQL server and the ability to upload and change files on it.

My development environment:

Mac OS X 10.9.1 on latest Mac Mini
Cordova CLI 3.4.0
For Android 4.3, 4.4 v19
Testing in device: Android-19, Nexus 7 with 4.3
No Jquery or other JS or CSS packages used

This post assumes you already have your Cordova PhoneGap environment already set up. Look elsewhere on this site for setting up for iOS or Android.

Continue reading

Adding Cordova APIs to Android via CLI: Camera and File APIs – shoot picture and upload to server folder with PHP


In this article, we are continuing our exploration of the Cordova APIs. On this page, we’ll explore the Camera and File APIs to get a photo onto the server. Here, we’ll learn how to upload the image to a server directory after shooting it.

This article requires that you have a server with PHP installed, are able to upload a file to it, and the server accepts uploads. My simple server has a CPanel interface that allowed me to do all of the above. (Don’t worry; I’m going to give you the steps for all of this.)

Continue reading

Cordova-supported WebSQL Database, with user-added data


In this article, we are examining another facet of the database storage, which is built into Cordova. In this article, we’ll create an empty database and allow the user to add records to the database and store them in the device. A button will delete the database. Two outputs are given, one in a text field and one in a table layout. With the text-only layout in the textfield, you can press and hold in the textfield and copy the contents to export it.

Continue reading

Adding Cordova APIs to Android via CLI: Prepopulated Database Storage


In this article, we are in part 5 of exploring the Cordova APIs, which started in https://iphonedevlog.wordpress.com/2014/01/31/adding-cordova-apis-to-android-via-cli-accelerometer-and-camera/ Refer to that article to set up your Cordova PhoneGap project files. You’ll want to follow the “Set Up the Android Project” section through step 9 inclusive.

Continue reading

Adding Cordova APIs to Android via CLI: File API


In this article, we are in part 4 of exploring the Cordova APIs, which started in https://iphonedevlog.wordpress.com/2014/01/31/adding-cordova-apis-to-android-via-cli-accelerometer-and-camera/ Refer to that article to set up your Cordova PhoneGap project files. You’ll want to follow the “Set Up the Android Project” section through step 9 inclusive. On this page, we’ll explore the File API from the perspective of getting our feet wet.

Continue reading

Adding Cordova APIs to Android via CLI: Geolocation, Globalization, Notification


In this article, we are in part 3 of exploring the Cordova APIs, which started in https://iphonedevlog.wordpress.com/2014/01/31/adding-cordova-apis-to-android-via-cli-accelerometer-and-camera/ Refer to that article to set up your Cordova PhoneGap project files. You’ll need to follow the “Set Up the Android Project” section through step 9 inclusive. On this page, we’ll explore the Geolocation, Globalization, Notification APIs from the perspective of getting our feet wet. Continue reading

Adding Cordova APIs to Android via CLI: Compass, Connection, Device


In this article, we are in part 2 of exploring the Cordova APIs, which started in https://iphonedevlog.wordpress.com/2014/01/31/adding-cordova-apis-to-android-via-cli-accelerometer-and-camera/ Refer to that article to set up your Cordova PhoneGap project files. You’ll need to follow the “Set Up the Android Project” section through step 9 inclusive. On this page, we’ll explore the Compass, Connection, and Device APIs. Continue reading