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

Book Review: PhoneGap 3.x Mobile Application Development


PhoneGap 3.x Mobile Application Development
Kerri Shotts
“Create useful and exciting real-world apps for iOS and Android devices with 12 fantastic projects”
Packt Publishers
https://www.packtpub.com/application-development/phonegap-3x-mobile-application-development-hotshot

Book Cover: PhoneGap 3.x Mobile Application Development

Book Cover: PhoneGap 3.x Mobile Application Development

Continue reading

Using Cordova CLI on Mac OS X to build iOS apps – updated 3/2018


This article gets you up to speed on how to integrate your HTML/CSS/JS app with Cordova into an iOS app using a Mac and prepare it for App Store submission. This article assumes you’ve already followed the steps on https://iphonedevlog.wordpress.com/2013/08/16/using-phonegap-3-0-cli-on-mac-osx-10-to-build-ios-and-android-projects/ to:

Download Node.js
Add PATH statements to .profile

In this article, I am referencing Mac OS X Yosemite 10.10.5 and Xcode 6.3.1 on a Mac Mini. Cordova CLI 5.4.1 was installed. I am referencing “cordova” in the command-line interface, not “phonegap.” This project will not use the PhoneGap Build service. Any updates to these programs may affect the following instructions.

Download Apple’s latest OS  and Xcode if you haven’t already:
http://www.apple.com/osx/apps/app-store.html  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

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

Adding Cordova APIs to Android via CLI: Accelerometer and Camera


In this beginner’s article, we’ll see what’s involved in adding the Cordova APIs to an PhoneGap Android project. It was written to help get your feet wet in case you’ve never tried it. An API (application programming interface) will allow us to use the features of the smartphone, such as accelerometer, camera, com
pass, and other features. In the case of Cordova’s PhoneGap, this APIs come in the form of plugins. They need to be added to the project on an as-needed basis.

Continue reading

Using PhoneGap 3.3 CLI on Mac OS X Mavericks to Build iOS Projects


This article gets you up to speed on how to integrate  your HTML/CSS/JS app with PhoneGap/Cordova into an iOS app using a Mac and prepare it for App Store submission. This article assumes you’ve already followed the steps on https://iphonedevlog.wordpress.com/2013/08/16/using-phonegap-3-0-cli-on-mac-osx-10-to-build-ios-and-android-projects/ to:

Download Node.js
Add PATH statements to .profile
Install Cordova CLI
Install Homebrew

In this article, I am referencing Mac OS X Mavericks 10.8.5 and Xcode 5.0.2 on a Mac Mini. PhoneGap CLI 3.3.0 was downloaded. I am referencing “cordova” in the command-line interface, not “phonegap.” This project will not use the PhoneGap Build service. Continue reading

Using Git Versioning Control Locally


You can add a versioning control system to track and manage your project’s assets with Git locally — you don’t need to upload it to git.com. Here’s how.

Downloading Git

Download Git from http://git-scm.com. It will detect your OS and provide the correct download for it. For my Mac, it was version 1.8.3.2.

The Mac version downloaded a dmg file to my Downloads folder. Double-click to open it, then double-click on the pkg file. (If your preferences prevent you from opening a file from an unidentified developer, then hold down Control, right-click on the pkg icon, and select open.) The Installer should appear; click to continue through the few steps, including providing your admin password. You’ll find a drive icon for the Git dmg package; right-click and select to Eject. (I believe “dmg” is short for “disc image.”)  Continue reading

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

Using PhoneGap 3.0 CLI on Mac OS X to Build iOS and Android Projects


At the time this was written PhoneGap Build does not support PG 3.0. These instructions assume Cordova PhoneGap is being used, not Build.

I highly recommend following the latest version of PhoneGap or Cordova. For instance, try these pages:

iOS: https://iphonedevlog.wordpress.com/2014/06/24/using-cordova-3-5-cli-on-mac-os-x-mavericks-to-build-ios-apps/

Android: https://iphonedevlog.wordpress.com/2014/06/20/using-cordova-3-5-cli-on-mac-os-x-mavericks-to-build-android-apps/

In this article, you will use CLI to build iOS and Android projects:

  • Install Cordova
  • Create a project with all necessary www folders and files
  • Add iOS and Android platform version folders and files
  • Build an Android debug apk for installation on a device for previewing
  • Build an Android project and view on a browser for previewing
  • Add the InAppBrowser and Splashscreen plugins
  • Update icons and splash screens for each platform
  • Update the config.xml, AndroidManifest.xml, and index.html files
  • Customize content for a particular platform
  • Finalize a product apk for Google Play upload, including keys and certificates

Continue reading

Cordova 2.9.0: “[ERROR] Error initializing Cordova: Class not found”


When I preview a page of my Android app with cordova.js (2.9.0) in Google Chrome, the page appears with an alert message saying,

The page at file://localhost/ says:
[ ]
gap:["Device","getDeviceInfo","Device1830682625"]
Cancel, OK

If I click on OK another alert appears, saying:

The page at file://localhost/ says:
[ ]
gap:["Device","getDeviceInfo","Device889844386"]
Cancel, OK

When I click on OK, the alert stops with no issues. These alerts pop up only on pages where cordova.js (2.9.0) are called, such as when the page contains external links and invokes the InAppBrowser. No other pages are affected.

I get these alerts on the Mac and PC. I’ve never received these alerts before 2.9.0. Continue reading

Adding Picture Zooming to Your PhoneGap App with iScroll4


I thought that by simply adding “user-scalable=yes” to the meta tag it would enable my pictures  to be pinch/zoom scalable. But such was not the case. Something more was needed, and iScroll4 supplied the missing functionality. What’s extra nice is that doesn’t need Jquery. Here are the simple steps I took to enable my pictures to have pinch/zoom. This was tested on a Nexus 7. Continue reading

Installing a 9-Patch Splash Screen for Android using draw9patch and PhoneGap


Cordova includes a Splashscreen API so you can add a splash screen to your app, which consists of a still graphic image displaying before your app starts.

If you create your Android splash screen as a 9-patch image, then the image will resize proportionally when displayed in either portrait or landscape mode. Continue reading

Fixing Android Lint Warnings Found when Building a PhoneGap Project


One of the checks you should make before creating your apk file for testing or uploading to an Android-based app store is the Run Lint command in Eclipse. This is found when you right-click on your project name in the Project Explorer, and select Android Tools > Run Lint…

The Lint Warnings view will show various performance, correctness, security, and other Android-environment-specific problems that may give rise to your app not loading or working in your device. (You would not use Lint to check for the validity of your HTML; you would use Validate for that.) Continue reading

Cordova PhoneGap 2.7.0 in Windows with Eclipse: Install to Release (updated 6/25/13)


I already have the major software installed on my Windows machine from my last Eclipse build, detailed in https://iphonedevlog.wordpress.com/2012/11/20/building-a-phonegap-android-app-on-windows-cordova-2-2-0-with-eclipse/. If this is your first time with Eclipse and PhoneGap, follow the link above and pay careful attention to the following setup sections:

Install Eclipse Juno IDE
Install Java JDK
Install ADT
Install the Android SDK
Android SDK Manager
Set up your PATH environment variables

The steps following will take up where these left off.
Continue reading