Upgrading Cordova BlackBerry

Upgrading Cordova BlackBerry

This document is for people who need to upgrade their Cordova versions from an older version to a current version of Cordova. 1.4.1 Note: 1.5.0 represents a semi-major change to the PhoneGap/Cordova project! All references to PhoneGap have been changed to Cordova.

Upgrade to 1.5.0 from 1.4.1

Updating just the www folder:

  1. Open your www/ folder, which contains your app.
  2. Remove and update the old phonegap.1.4.1.jar file in the ext/ folder and replace it with cordova.1.5.0.jar.
  3. Update the contents of the ext-air/ folder and make sure to rename the folders with Phonegap with them to Cordova.
  4. Copy the new cordova-1.5.0.js into your project.
    • If playbook, then update the .js file in the playbook/ folder.
  5. Update your HTML to use the new cordova-1.5.0.js file.
  6. Update your www/plugins.xml file - remember all of the references to PhoneGap need to be changed to Cordova:

From: name="App" value="com.phonegap.app.App"/> name="Device" value="com.phonegap.device.Device"/> name="Camera" value="com.phonegap.camera.Camera"/>
name="Network Status" value="com.phonegap.network.Network"/> name="Notification" value="com.phonegap.notification.Notification"/> name="Accelerometer" value="com.phonegap.accelerometer.Accelerometer"/> name="Geolocation" value="com.phonegap.geolocation.Geolocation"/> name="File" value="com.phonegap.file.FileManager"/> name="FileTransfer" value="com.phonegap.http.FileTransfer"/> name="Contact" value="com.phonegap.pim.Contact"/> name="MediaCapture" value="com.phonegap.media.MediaCapture"/> name="Battery" value="com.phonegap.battery.Battery"/>

To: name="App" value="org.apache.cordova.app.App"/> name="Device" value="org.apache.cordova.device.Device"/> name="Camera" value="org.apache.cordova.camera.Camera"/> name="Network Status" value="org.apache.cordova.network.Network"/> name="Notification" value="org.apache.cordova.notification.Notification"/> name="Accelerometer" value="org.apache.cordova.accelerometer.Accelerometer"/> name="Geolocation" value="org.apache.cordova.geolocation.Geolocation"/> name="File" value="org.apache.cordova.file.FileManager"/> name="FileTransfer" value="org.apache.cordova.http.FileTransfer"/> name="Contact" value="org.apache.cordova.pim.Contact"/> name="MediaCapture" value="org.apache.cordova.media.MediaCapture"/> name="Battery" value="org.apache.cordova.battery.Battery"/>

Updating the sample folder (ie, updating using the ant tools):

  1. Open the sample/lib/ folder.
  2. Update the .jar file in the phonegap.1.4.1/ext/ folder.
  3. Update the contents of the phonegap.1.4.1/ext-air/ folder.
  4. Update the .js file in the phonegap.1.4.1/javascript/ folder.
  5. Open the sample/lib/ folder and rename the cordova.1.4.1/ folder to cordova.1.5.0/.
  6. Update build.xml to update the ant tools.
  7. Type ant blackberry build or ant playbook build to update the www/ folder with updated Cordova.
  8. Open the www/ folder and update your HTML to use the new cordova-1.5.0.js file.
  9. Update your www/plugins.xml file - remember all of the references to PhoneGap need to be changed to Cordova:

From: name="App" value="com.phonegap.app.App"/> name="Device" value="com.phonegap.device.Device"/> name="Camera" value="com.phonegap.camera.Camera"/>
name="Network Status" value="com.phonegap.network.Network"/> name="Notification" value="com.phonegap.notification.Notification"/> name="Accelerometer" value="com.phonegap.accelerometer.Accelerometer"/> name="Geolocation" value="com.phonegap.geolocation.Geolocation"/> name="File" value="com.phonegap.file.FileManager"/> name="FileTransfer" value="com.phonegap.http.FileTransfer"/> name="Contact" value="com.phonegap.pim.Contact"/> name="MediaCapture" value="com.phonegap.media.MediaCapture"/> name="Battery" value="com.phonegap.battery.Battery"/>

To: name="App" value="org.apache.cordova.app.App"/> name="Device" value="org.apache.cordova.device.Device"/> name="Camera" value="org.apache.cordova.camera.Camera"/> name="Network Status" value="org.apache.cordova.network.Network"/> name="Notification" value="org.apache.cordova.notification.Notification"/> name="Accelerometer" value="org.apache.cordova.accelerometer.Accelerometer"/> name="Geolocation" value="org.apache.cordova.geolocation.Geolocation"/> name="File" value="org.apache.cordova.file.FileManager"/> name="FileTransfer" value="org.apache.cordova.http.FileTransfer"/> name="Contact" value="org.apache.cordova.pim.Contact"/> name="MediaCapture" value="org.apache.cordova.media.MediaCapture"/> name="Battery" value="org.apache.cordova.battery.Battery"/>