incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject [1/15] git commit: Rename to Cordova
Date Fri, 03 Feb 2012 15:43:09 GMT
Updated Branches:
  refs/heads/master fa4d6d369 -> 664a061d1


Rename to Cordova


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/664a061d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/664a061d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/664a061d

Branch: refs/heads/master
Commit: 664a061d10e2db79e05a0c5e2a1b5afe5e76d08b
Parents: fa4d6d3
Author: macdonst <simon.macdonald@gmail.com>
Authored: Wed Feb 1 20:45:49 2012 -0500
Committer: macdonst <simon.macdonald@gmail.com>
Committed: Fri Feb 3 10:38:40 2012 -0500

----------------------------------------------------------------------
 .gitignore                                         |    8 +-
 README.md                                          |   14 +-
 bin/BOOM                                           |    2 +-
 bin/bench                                          |   12 +-
 bin/create                                         |   22 +-
 bin/create.js                                      |   16 +-
 bin/create.xml                                     |   16 +-
 bin/templates/project/.cordova/android/readme.md   |    1 +
 bin/templates/project/.cordova/readme.md           |    3 +
 bin/templates/project/.phonegap/android/readme.md  |    1 -
 bin/templates/project/.phonegap/readme.md          |    3 -
 bin/templates/project/cordova/create               |   36 +
 bin/templates/project/cordova/debug                |    9 +
 bin/templates/project/cordova/emulate              |   12 +
 bin/templates/project/cordova/log                  |    3 +
 .../project/cordova/templates/Activity.java        |   16 +
 .../cordova/templates/project/AndroidManifest.xml  |   50 +
 .../templates/project/assets/www/index.html        |   42 +
 .../cordova/templates/project/assets/www/main.js   |  146 ++
 .../templates/project/assets/www/master.css        |   96 +
 .../templates/project/res/drawable/icon.png        |  Bin 0 -> 5800 bytes
 .../cordova/templates/project/res/xml/cordova.xml  |    5 +
 .../cordova/templates/project/res/xml/plugins.xml  |   19 +
 bin/templates/project/phonegap/create              |   36 -
 bin/templates/project/phonegap/debug               |    9 -
 bin/templates/project/phonegap/emulate             |   12 -
 bin/templates/project/phonegap/log                 |    3 -
 .../project/phonegap/templates/Activity.java       |   16 -
 .../phonegap/templates/project/AndroidManifest.xml |   50 -
 .../templates/project/assets/www/index.html        |   42 -
 .../phonegap/templates/project/assets/www/main.js  |  146 --
 .../templates/project/assets/www/master.css        |   96 -
 .../templates/project/res/drawable/icon.png        |  Bin 5800 -> 0 bytes
 .../templates/project/res/xml/phonegap.xml         |    5 -
 .../phonegap/templates/project/res/xml/plugins.xml |   19 -
 bin/test                                           |    8 +-
 bin/tests/create.coffee                            |   12 +-
 framework/.project                                 |    2 +-
 framework/AndroidManifest.xml                      |    4 +-
 framework/assets/js/accelerometer.js               |   16 +-
 framework/assets/js/app.js                         |   18 +-
 framework/assets/js/battery.js                     |   22 +-
 framework/assets/js/camera.js                      |    8 +-
 framework/assets/js/capture.js                     |   14 +-
 framework/assets/js/compass.js                     |   16 +-
 framework/assets/js/contact.js                     |   14 +-
 framework/assets/js/cordova.js.base                |  920 +++++++
 framework/assets/js/crypto.js                      |   10 +-
 framework/assets/js/device.js                      |   20 +-
 framework/assets/js/file.js                        |   48 +-
 framework/assets/js/filetransfer.js                |    8 +-
 framework/assets/js/geolocation.js                 |   28 +-
 framework/assets/js/media.js                       |   38 +-
 framework/assets/js/network.js                     |   18 +-
 framework/assets/js/notification.js                |   24 +-
 framework/assets/js/phonegap.js.base               |  922 -------
 framework/assets/js/position.js                    |    4 +-
 framework/assets/js/storage.js                     |   18 +-
 framework/assets/www/index.html                    |    2 +-
 framework/build.xml                                |   44 +-
 framework/res/values/strings.xml                   |    2 +-
 framework/res/xml/cordova.xml                      |   19 +
 framework/res/xml/phonegap.xml                     |   19 -
 framework/res/xml/plugins.xml                      |   32 +-
 framework/src/com/phonegap/AccelListener.java      |  308 ---
 framework/src/com/phonegap/App.java                |  198 --
 framework/src/com/phonegap/AudioHandler.java       |  363 ---
 framework/src/com/phonegap/AudioPlayer.java        |  450 ----
 .../src/com/phonegap/AuthenticationToken.java      |   51 -
 framework/src/com/phonegap/BatteryListener.java    |  156 --
 framework/src/com/phonegap/CallbackServer.java     |  431 ----
 framework/src/com/phonegap/CameraLauncher.java     |  504 ----
 framework/src/com/phonegap/Capture.java            |  399 ---
 framework/src/com/phonegap/CompassListener.java    |  305 ---
 framework/src/com/phonegap/ContactAccessor.java    |  197 --
 .../src/com/phonegap/ContactAccessorSdk5.java      | 1922 ---------------
 framework/src/com/phonegap/ContactManager.java     |  113 -
 .../src/com/phonegap/CordovaChromeClient.java      |  314 ---
 .../src/com/phonegap/CordovaWebViewClient.java     |  296 ---
 framework/src/com/phonegap/Device.java             |  218 --
 framework/src/com/phonegap/DirectoryManager.java   |  161 --
 framework/src/com/phonegap/DroidGap.java           | 1391 -----------
 framework/src/com/phonegap/ExifHelper.java         |  165 --
 framework/src/com/phonegap/FileTransfer.java       |  443 ----
 framework/src/com/phonegap/FileUploadResult.java   |   63 -
 framework/src/com/phonegap/FileUtils.java          | 1024 --------
 framework/src/com/phonegap/GeoBroker.java          |  165 --
 framework/src/com/phonegap/GeoListener.java        |  133 -
 framework/src/com/phonegap/GpsListener.java        |  163 --
 framework/src/com/phonegap/HttpHandler.java        |   80 -
 .../phonegap/LinearLayoutSoftKeyboardDetect.java   |  104 -
 framework/src/com/phonegap/NetworkListener.java    |  153 --
 framework/src/com/phonegap/NetworkManager.java     |  248 --
 framework/src/com/phonegap/Notification.java       |  366 ---
 framework/src/com/phonegap/PreferenceNode.java     |   16 -
 framework/src/com/phonegap/PreferenceSet.java      |   43 -
 framework/src/com/phonegap/StandAlone.java         |   35 -
 framework/src/com/phonegap/Storage.java            |  239 --
 framework/src/com/phonegap/TempListener.java       |  112 -
 framework/src/com/phonegap/api/IPlugin.java        |  116 -
 framework/src/com/phonegap/api/LOG.java            |  234 --
 .../src/com/phonegap/api/PhonegapActivity.java     |   80 -
 framework/src/com/phonegap/api/Plugin.java         |  210 --
 framework/src/com/phonegap/api/PluginManager.java  |  359 ---
 framework/src/com/phonegap/api/PluginResult.java   |  140 --
 .../src/com/phonegap/file/EncodingException.java   |   28 -
 .../src/com/phonegap/file/FileExistsException.java |   28 -
 .../file/InvalidModificationException.java         |   29 -
 .../file/NoModificationAllowedException.java       |   28 -
 .../com/phonegap/file/TypeMismatchException.java   |   29 -
 .../src/org/apache/cordova/AccelListener.java      |  308 +++
 framework/src/org/apache/cordova/App.java          |  198 ++
 framework/src/org/apache/cordova/AudioHandler.java |  364 +++
 framework/src/org/apache/cordova/AudioPlayer.java  |  450 ++++
 .../org/apache/cordova/AuthenticationToken.java    |   51 +
 .../src/org/apache/cordova/BatteryListener.java    |  156 ++
 .../src/org/apache/cordova/CallbackServer.java     |  431 ++++
 .../src/org/apache/cordova/CameraLauncher.java     |  504 ++++
 framework/src/org/apache/cordova/Capture.java      |  399 +++
 .../src/org/apache/cordova/CompassListener.java    |  305 +++
 .../src/org/apache/cordova/ContactAccessor.java    |  197 ++
 .../org/apache/cordova/ContactAccessorSdk5.java    | 1922 +++++++++++++++
 .../src/org/apache/cordova/ContactManager.java     |  113 +
 .../org/apache/cordova/CordovaChromeClient.java    |  314 +++
 .../org/apache/cordova/CordovaWebViewClient.java   |  296 +++
 framework/src/org/apache/cordova/Device.java       |  219 ++
 .../src/org/apache/cordova/DirectoryManager.java   |  161 ++
 framework/src/org/apache/cordova/DroidGap.java     | 1391 +++++++++++
 framework/src/org/apache/cordova/ExifHelper.java   |  165 ++
 framework/src/org/apache/cordova/FileTransfer.java |  443 ++++
 .../src/org/apache/cordova/FileUploadResult.java   |   63 +
 framework/src/org/apache/cordova/FileUtils.java    | 1024 ++++++++
 framework/src/org/apache/cordova/GeoBroker.java    |  165 ++
 framework/src/org/apache/cordova/GeoListener.java  |  133 +
 framework/src/org/apache/cordova/GpsListener.java  |  163 ++
 framework/src/org/apache/cordova/HttpHandler.java  |   80 +
 .../cordova/LinearLayoutSoftKeyboardDetect.java    |  104 +
 .../src/org/apache/cordova/NetworkListener.java    |  153 ++
 .../src/org/apache/cordova/NetworkManager.java     |  248 ++
 framework/src/org/apache/cordova/Notification.java |  366 +++
 .../src/org/apache/cordova/PreferenceNode.java     |   16 +
 .../src/org/apache/cordova/PreferenceSet.java      |   44 +
 framework/src/org/apache/cordova/StandAlone.java   |   35 +
 framework/src/org/apache/cordova/Storage.java      |  239 ++
 framework/src/org/apache/cordova/TempListener.java |  112 +
 .../org/apache/cordova/api/CordovaActivity.java    |   80 +
 framework/src/org/apache/cordova/api/IPlugin.java  |  116 +
 framework/src/org/apache/cordova/api/LOG.java      |  234 ++
 framework/src/org/apache/cordova/api/Plugin.java   |  210 ++
 .../src/org/apache/cordova/api/PluginManager.java  |  358 +++
 .../src/org/apache/cordova/api/PluginResult.java   |  140 ++
 .../org/apache/cordova/file/EncodingException.java |   28 +
 .../apache/cordova/file/FileExistsException.java   |   28 +
 .../cordova/file/InvalidModificationException.java |   29 +
 .../file/NoModificationAllowedException.java       |   28 +
 .../apache/cordova/file/TypeMismatchException.java |   29 +
 .../test/com/phonegap/PreferenceNodeTest.java      |   35 -
 framework/test/com/phonegap/PreferenceSetTest.java |   55 -
 .../org/apache/cordova/PreferenceNodeTest.java     |   35 +
 .../test/org/apache/cordova/PreferenceSetTest.java |   55 +
 160 files changed, 14340 insertions(+), 14338 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index b83f1e9..06496d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,16 @@
 .DS_Store
 default.properties
 gen
-assets/www/phonegap.js
+assets/www/cordova.js
 local.properties
 framework/proguard.cfg
-framework/phonegap.jar
+framework/cordova.jar
+framework/cordova-*.jar
 framework/phonegap-*.jar
 framework/bin
-framework/test/com/phonegap/*.class
+framework/test/org/apache/cordova/*.class
 framework/assets/www/.DS_Store
+framework/assets/www/cordova-*.js
 framework/assets/www/phonegap-*.js
 example
 ./test

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index ea999ff..b80e670 100755
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ Requires
 Building
 ---
 
-To create your phonegap.jar, run in the framework directory:
+To create your cordova.jar, run in the framework directory:
 
     android update project -p . -t android-15
     ant jar
@@ -45,9 +45,9 @@ Project Commands
 
 These commands live in a generated Cordova Android project.
 
-    ./phonegap/debug [path] ..................... install to first device
-    ./phonegap/emulate .......................... start avd (emulator) named default
-    ./phonegap/log .............................. starts logcat
+    ./cordovap/debug [path] ..................... install to first device
+    ./cordova/emulate .......................... start avd (emulator) named default
+    ./cordova/log .............................. starts logcat
 
 Running the Example Project
 ---
@@ -60,11 +60,11 @@ Create the example project and build it to the first device:
 
     ./bin/create
     cd example
-    ./phonegap/debug
+    ./cordova/debug
 
 Start adb logcat (console.log calls output here):
 
-    ./phonegap/log
+    ./cordova/log
 
 Running the [callback/callback-test](http://github.com/callback/callback-test) tests:
 ---
@@ -82,7 +82,7 @@ Importing a Cordova Android Project into Eclipse
 1. File > New > Project...
 2. Android > Android Project
 3. Create project from existing source (point to the generated app found in tmp/android)
-4. Right click on libs/phonegap.jar and add to build path
+4. Right click on libs/cordova.jar and add to build path
 5. Right click on the project root: Run as > Run Configurations
 6. Click on the Target tab and select Manual (this way you can choose the emulator or device to build to)
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/BOOM
----------------------------------------------------------------------
diff --git a/bin/BOOM b/bin/BOOM
index 2293406..fa33b0a 100755
--- a/bin/BOOM
+++ b/bin/BOOM
@@ -1,4 +1,4 @@
 #! /bin/sh
 
 ./bin/create
-cd ./example && ./phonegap/debug && ./phonegap/log
+cd ./example && ./cordova/debug && ./cordova/log

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/bench
----------------------------------------------------------------------
diff --git a/bin/bench b/bin/bench
index 3fa2d2a..9a2663e 100755
--- a/bin/bench
+++ b/bin/bench
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Creates an app in `./bench` that posts results to http://phonegap-bench.heroku.com with current PhoneGap/Android sha.
+# Creates an app in `./bench` that posts results to http://cordova-bench.heroku.com with current cordova/Android sha.
 #
 # USAGE
 #   ./bin/bench
@@ -13,17 +13,17 @@ then
 fi
 
 # create a benching app
-./bin/create ./bench com.phonegap.bench PhoneGapBench
+./bin/create ./bench org.apache.cordova.bench cordovaBench
 
 # grab the latest bench www code
-git clone git@github.com:brianleroux/phonegap-bench.git
+git clone git@github.com:brianleroux/cordova-bench.git
 
 # copy it into the app
-cat ./phonegap-bench/www/index.html > ./bench/assets/www/index.html
-#cat ~/Desktop/phonegap-bench/www/index.html > ./bench/assets/www/index.html
+cat ./cordova-bench/www/index.html > ./bench/assets/www/index.html
+#cat ~/Desktop/cordova-bench/www/index.html > ./bench/assets/www/index.html
 
 # clean up
-rm -rf ./phonegap-bench
+rm -rf ./cordova-bench
 
 # launch to the first device found
 ./bin/debug ./bench

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index 0672c16..1f2a421 100755
--- a/bin/create
+++ b/bin/create
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# create a phonegap/android project
+# create a cordova/android project
 # 
 # USAGE
 #   ./create [path package activity]
@@ -8,8 +8,8 @@
 set -e
 
 PROJECT_PATH=${1:-"./example"}
-PACKAGE=${2:-"com.phonegap.example"}
-ACTIVITY=${3:-"PhoneGapExample"}
+PACKAGE=${2:-"org.apache.cordova.example"}
+ACTIVITY=${3:-"cordovaExample"}
 TARGET=$(android list targets | grep 'id: ' | sed 's/id: \([0-9]*\).*/\1/g' | tail -1)
 VERSION=$(cat ./VERSION)
 
@@ -19,23 +19,23 @@ then
     rm -rf $PROJECT_PATH
 fi
 
-# update the phonegap-android framework for the desired target
+# update the cordova-android framework for the desired target
 android update project --target $TARGET --path ./framework
 
-# compile phonegap.js and phonegap.jar
+# compile cordova.js and cordova.jar
 cd ./framework && ant jar && cd ../
 
 # copy all the bin scripts etc in there
 cp -R ./bin/templates/project/ $PROJECT_PATH
 
-# copy in phonegap.js
-cp ./framework/assets/www/phonegap-$VERSION.js $PROJECT_PATH/.phonegap/android/phonegap-$VERSION.js
+# copy in cordova.js
+cp ./framework/assets/www/cordova-$VERSION.js $PROJECT_PATH/.cordova/android/cordova-$VERSION.js
 
-# copy in phonegap.jar
-cp ./framework/phonegap-$VERSION.jar $PROJECT_PATH/.phonegap/android/phonegap-$VERSION.jar
+# copy in cordova.jar
+cp ./framework/cordova-$VERSION.jar $PROJECT_PATH/.cordova/android/cordova-$VERSION.jar
 
 # app properties
-cat > $PROJECT_PATH/.phonegap/config <<eom
+cat > $PROJECT_PATH/.cordova/config <<eom
 VERSION=$VERSION
 PROJECT_PATH=$PROJECT_PATH
 PACKAGE=$PACKAGE
@@ -43,4 +43,4 @@ ACTIVITY=$ACTIVITY
 TARGET=$TARGET
 eom
 
-(cd $PROJECT_PATH && ./phonegap/create)
+(cd $PROJECT_PATH && ./cordova/create)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/create.js
----------------------------------------------------------------------
diff --git a/bin/create.js b/bin/create.js
index 37e2977..708eec2 100644
--- a/bin/create.js
+++ b/bin/create.js
@@ -1,5 +1,5 @@
 /*
- * create a phonegap/android project
+ * create a cordova/android project
  *
  * USAGE
  *  ./create [path package activity]
@@ -26,7 +26,7 @@ function exec(s) {
 }
 
 var args = WScript.Arguments, PROJECT_PATH="example", 
-    PACKAGE="com.phonegap.example", ACTIVITY="PhoneGapExample",
+    PACKAGE="org.apache.cordova.example", ACTIVITY="cordovaExample",
     shell=WScript.CreateObject("WScript.Shell");
 
 if (args.Count() == 3) {
@@ -54,10 +54,10 @@ fi
 // create the project
 exec('android.bat create project --target '+TARGET+' --path '+PROJECT_PATH+' --package '+PACKAGE+' --activity '+ACTIVITY);
 
-// update the phonegap framework project to a target that exists on this machine
+// update the cordova framework project to a target that exists on this machine
 exec('android.bat update project --target '+TARGET+' --path framework');
 
-// compile phonegap.js and phonegap.jar
+// compile cordova.js and cordova.jar
 // if you see an error about "Unable to resolve target" then you may need to 
 // update your android tools or install an additional Android platform version
 exec('ant.bat -f framework\\build.xml jar');
@@ -65,11 +65,11 @@ exec('ant.bat -f framework\\build.xml jar');
 // copy in the project template
 exec('cmd /c xcopy bin\\templates\\project '+PROJECT_PATH+' /S /Y');
 
-// copy in phonegap.js
-exec('cmd /c copy framework\\assets\\www\\phonegap-'+VERSION+'.js '+PROJECT_PATH+'\\assets\\www\\phonegap-'+VERSION+'.js /Y');
+// copy in cordova.js
+exec('cmd /c copy framework\\assets\\www\\cordova-'+VERSION+'.js '+PROJECT_PATH+'\\assets\\www\\cordova-'+VERSION+'.js /Y');
 
-// copy in phonegap.jar
-exec('cmd /c copy framework\\phonegap-'+VERSION+'.jar '+PROJECT_PATH+'\\libs\\phonegap-'+VERSION+'.jar /Y');
+// copy in cordova.jar
+exec('cmd /c copy framework\\cordova-'+VERSION+'.jar '+PROJECT_PATH+'\\libs\\cordova-'+VERSION+'.jar /Y');
 
 // copy in default activity
 exec('cmd /c copy bin\\templates\\Activity.java '+ACTIVITY_PATH+' /Y');

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/create.xml
----------------------------------------------------------------------
diff --git a/bin/create.xml b/bin/create.xml
index c8c636a..a719385 100644
--- a/bin/create.xml
+++ b/bin/create.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project name="PhoneGap" default="create" basedir="../">
+<project name="cordova" default="create" basedir="../">
 
 	<property name="project.path" value="${basedir}/example"/>
-	<property name="package" value="com.phonegap.example"/>
-	<property name="activity" value="PhoneGapExample"/>
+	<property name="package" value="org.apache.cordova.example"/>
+	<property name="activity" value="cordovaExample"/>
 
 	<target name="create">
 
@@ -50,7 +50,7 @@
 			<arg line="update project --target ${target} --path ${basedir}/framework"/>
 		</exec>
 
-		<!-- compile phonegap.js and phonegap.jar -->
+		<!-- compile cordova.js and cordova.jar -->
 		<!--	// if you see an error about "Unable to resolve target" then you may need to 
 				// update your android tools or install an additional Android platform version -->
 		<ant antfile="${basedir}/framework/build.xml" useNativeBasedir="true" inheritAll="false" />
@@ -60,11 +60,11 @@
 			<fileset dir="${basedir}/bin/templates/project"/>
 		</copy>
 
-		<!-- copy in phonegap.js -->
-		<copy file="${basedir}/framework/assets/www/phonegap-${version}.js" todir="${project.path}/assets/www/" />
+		<!-- copy in cordova.js -->
+		<copy file="${basedir}/framework/assets/www/cordova-${version}.js" todir="${project.path}/assets/www/" />
 
-		<!-- copy in phonegap.jar -->
-		<copy file="${basedir}/framework/phonegap-${version}.jar" todir="${project.path}/libs/" />
+		<!-- copy in cordova.jar -->
+		<copy file="${basedir}/framework/cordova-${version}.jar" todir="${project.path}/libs/" />
 
 		<!-- copy in default activity -->
 		<copy file="${basedir}/bin/templates/Activity.java" tofile="${activity.path}" overwrite="true" />

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/.cordova/android/readme.md
----------------------------------------------------------------------
diff --git a/bin/templates/project/.cordova/android/readme.md b/bin/templates/project/.cordova/android/readme.md
new file mode 100644
index 0000000..152f5a5
--- /dev/null
+++ b/bin/templates/project/.cordova/android/readme.md
@@ -0,0 +1 @@
+ok...

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/.cordova/readme.md
----------------------------------------------------------------------
diff --git a/bin/templates/project/.cordova/readme.md b/bin/templates/project/.cordova/readme.md
new file mode 100644
index 0000000..ad8d878
--- /dev/null
+++ b/bin/templates/project/.cordova/readme.md
@@ -0,0 +1,3 @@
+this is local config for cordova stuff to be eventually moved to
+config.xml ...we think. feedback to @davejohnson/@brianleroux
+appreciated here!

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/.phonegap/android/readme.md
----------------------------------------------------------------------
diff --git a/bin/templates/project/.phonegap/android/readme.md b/bin/templates/project/.phonegap/android/readme.md
deleted file mode 100644
index 152f5a5..0000000
--- a/bin/templates/project/.phonegap/android/readme.md
+++ /dev/null
@@ -1 +0,0 @@
-ok...

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/.phonegap/readme.md
----------------------------------------------------------------------
diff --git a/bin/templates/project/.phonegap/readme.md b/bin/templates/project/.phonegap/readme.md
deleted file mode 100644
index 7028aab..0000000
--- a/bin/templates/project/.phonegap/readme.md
+++ /dev/null
@@ -1,3 +0,0 @@
-this is local config for phonegap stuff to be eventually moved to
-config.xml ...we think. feedback to @davejohnson/@brianleroux
-appreciated here!

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/create
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/create b/bin/templates/project/cordova/create
new file mode 100755
index 0000000..32f1e16
--- /dev/null
+++ b/bin/templates/project/cordova/create
@@ -0,0 +1,36 @@
+#! /bin/sh
+#
+# create a cordova/android project
+# 
+# USAGE
+#   ./create [path package activity]
+#
+
+# load up the config
+. ./.cordova/config
+
+PACKAGE_AS_PATH=$(echo $PACKAGE | sed 's/\./\//g')
+ACTIVITY_PATH=./src/$PACKAGE_AS_PATH/$ACTIVITY.java
+MANIFEST_PATH=./AndroidManifest.xml
+
+# create the project
+android create project --target $TARGET --path . --package $PACKAGE --activity $ACTIVITY
+
+# copy all the cordova scripts etc in there
+cp -R ./cordova/templates/project/* .
+
+# copy in cordova.js
+cp ./.cordova/android/cordova-$VERSION.js ./assets/www
+
+# copy in cordova.jar
+cp ./.cordova/android/cordova-$VERSION.jar ./libs
+
+# copy in default activity
+cat ./cordova/templates/Activity.java > $ACTIVITY_PATH
+
+# interpolate the acivity name and package
+find "$ACTIVITY_PATH" | xargs grep '__ACTIVITY__' -sl | xargs -L1 sed -i -e "s/__ACTIVITY__/${ACTIVITY}/g"
+find "$ACTIVITY_PATH" | xargs grep '__ID__' -sl | xargs -L1 sed -i -e "s/__ID__/${PACKAGE}/g"
+
+find "$MANIFEST_PATH" | xargs grep '__ACTIVITY__' -sl | xargs -L1 sed -i -e "s/__ACTIVITY__/${ACTIVITY}/g"
+find "$MANIFEST_PATH" | xargs grep '__PACKAGE__' -sl | xargs -L1 sed -i -e "s/__PACKAGE__/${PACKAGE}/g"

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/debug
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/debug b/bin/templates/project/cordova/debug
new file mode 100755
index 0000000..8dd3187
--- /dev/null
+++ b/bin/templates/project/cordova/debug
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ./.cordova/config
+
+# if there are no devices listed then emulate
+
+
+ant debug install
+adb shell am start -n $PACKAGE/$PACKAGE.$ACTIVITY

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/emulate
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/emulate b/bin/templates/project/cordova/emulate
new file mode 100755
index 0000000..21d7b9c
--- /dev/null
+++ b/bin/templates/project/cordova/emulate
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+#Available Android Virtual Devices:
+#    Name: default
+#    Path: /Users/davejohnson/.android/avd/default.avd
+#  Target: Android 2.2 (API level 8)
+#    Skin: WVGA800
+#  Sdcard: 100M
+
+# get the name of the first virtual device or use command line arg or use "default"
+
+emulator -cpu-delay 0 -no-boot-anim -cache ./tmp/cache -avd default > /dev/null 2>&1 & # put the avd's chatty ass in the background
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/log
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/log b/bin/templates/project/cordova/log
new file mode 100755
index 0000000..2ff1e3a
--- /dev/null
+++ b/bin/templates/project/cordova/log
@@ -0,0 +1,3 @@
+#! /bin/sh 
+
+adb logcat

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/templates/Activity.java
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/templates/Activity.java b/bin/templates/project/cordova/templates/Activity.java
new file mode 100644
index 0000000..60ad6a2
--- /dev/null
+++ b/bin/templates/project/cordova/templates/Activity.java
@@ -0,0 +1,16 @@
+package __ID__;
+
+import android.app.Activity;
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class __ACTIVITY__ extends DroidGap
+{
+    @Override
+    public void onCreate(Bundle savedInstanceState)
+    {
+        super.onCreate(savedInstanceState);
+        super.loadUrl("file:///android_asset/www/index.html");
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/templates/project/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/templates/project/AndroidManifest.xml b/bin/templates/project/cordova/templates/project/AndroidManifest.xml
new file mode 100644
index 0000000..d7cccc4
--- /dev/null
+++ b/bin/templates/project/cordova/templates/project/AndroidManifest.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
+      package="__PACKAGE__" android:versionName="1.1" android:versionCode="5">
+    <supports-screens
+    	android:largeScreens="true"
+    	android:normalScreens="true"
+    	android:smallScreens="true"
+    	android:xlargeScreens="true"
+    	android:resizeable="true"
+    	android:anyDensity="true"
+    	/>
+
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-permission android:name="android.permission.VIBRATE" />
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.RECEIVE_SMS" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
+    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
+    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+    <uses-permission android:name="android.permission.READ_CONTACTS" />
+    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
+
+    <uses-feature android:name="android.hardware.camera" />
+    <uses-feature android:name="android.hardware.camera.autofocus" />
+
+    <application android:icon="@drawable/icon" android:label="@string/app_name"
+    	android:debuggable="true">
+		<activity android:name="__ACTIVITY__" android:label="@string/app_name" 
+				  android:configChanges="orientation|keyboardHidden">
+			<intent-filter>
+				<action android:name="android.intent.action.MAIN" />
+				<category android:name="android.intent.category.LAUNCHER" />
+			</intent-filter>
+        </activity>
+        <activity android:name="org.apache.cordova.DroidGap" android:label="@string/app_name" 
+            	  android:configChanges="orientation|keyboardHidden">
+        	<intent-filter>
+        	</intent-filter>
+        </activity>
+    </application>
+
+	<uses-sdk android:minSdkVersion="5" />
+</manifest> 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/templates/project/assets/www/index.html
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/templates/project/assets/www/index.html b/bin/templates/project/cordova/templates/project/assets/www/index.html
new file mode 100644
index 0000000..ec9a77f
--- /dev/null
+++ b/bin/templates/project/cordova/templates/project/assets/www/index.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<html>
+  <head>
+    <meta name="viewport" content="width=320; user-scalable=no" />
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+    <title>PhoneGap</title>
+	  <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title">
+	  <script type="text/javascript" charset="utf-8" src="cordova-1.4.1.js"></script>
+	  <script type="text/javascript" charset="utf-8" src="main.js"></script>
+
+  </head>
+  <body onload="init();" id="stage" class="theme">
+    <h1>Welcome to PhoneGap!</h1>
+    <h2>this file is located at assets/www/index.html</h2>
+    <div id="info">
+        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
+        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
+        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
+                   </span>, Color Depth: <span id="colorDepth"></span></h4>
+     </div>
+    <dl id="accel-data">
+      <dt>X:</dt><dd id="x">&nbsp;</dd>
+      <dt>Y:</dt><dd id="y">&nbsp;</dd>
+      <dt>Z:</dt><dd id="z">&nbsp;</dd>
+    </dl>
+    <a href="#" class="btn large" onclick="toggleAccel();">Toggle Accelerometer</a>
+    <a href="#" class="btn large" onclick="getLocation();">Get Location</a>
+	<a href="tel:411" class="btn large">Call 411</a>
+    <a href="#" class="btn large" onclick="beep();">Beep</a>
+    <a href="#" class="btn large" onclick="vibrate();">Vibrate</a>
+    <a href="#" class="btn large" onclick="show_pic();">Get a Picture</a>
+    <a href="#" class="btn large" onclick="get_contacts();return false;">Get Phone's Contacts</a>
+    <a href="#" class="btn large" onclick="check_network();return false;">Check Network</a>
+    <dl>
+	<dt>Compass Heading:</dt><dd id="h">Off</dd>
+    </dl>
+    <a href="#" class="btn large" onclick="toggleCompass();return false;">Toggle Compass</a>
+    <div id="viewport" class="viewport" style="display: none;">
+      <img style="width:60px;height:60px" id="test_img" src="" />
+    </div>
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/templates/project/assets/www/main.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/templates/project/assets/www/main.js b/bin/templates/project/cordova/templates/project/assets/www/main.js
new file mode 100644
index 0000000..f631692
--- /dev/null
+++ b/bin/templates/project/cordova/templates/project/assets/www/main.js
@@ -0,0 +1,146 @@
+var deviceInfo = function() {
+    document.getElementById("platform").innerHTML = device.platform;
+    document.getElementById("version").innerHTML = device.version;
+    document.getElementById("uuid").innerHTML = device.uuid;
+    document.getElementById("name").innerHTML = device.name;
+    document.getElementById("width").innerHTML = screen.width;
+    document.getElementById("height").innerHTML = screen.height;
+    document.getElementById("colorDepth").innerHTML = screen.colorDepth;
+};
+
+var getLocation = function() {
+    var suc = function(p) {
+        alert(p.coords.latitude + " " + p.coords.longitude);
+    };
+    var locFail = function() {
+    };
+    navigator.geolocation.getCurrentPosition(suc, locFail);
+};
+
+var beep = function() {
+    navigator.notification.beep(2);
+};
+
+var vibrate = function() {
+    navigator.notification.vibrate(0);
+};
+
+function roundNumber(num) {
+    var dec = 3;
+    var result = Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
+    return result;
+}
+
+var accelerationWatch = null;
+
+function updateAcceleration(a) {
+    document.getElementById('x').innerHTML = roundNumber(a.x);
+    document.getElementById('y').innerHTML = roundNumber(a.y);
+    document.getElementById('z').innerHTML = roundNumber(a.z);
+}
+
+var toggleAccel = function() {
+    if (accelerationWatch !== null) {
+        navigator.accelerometer.clearWatch(accelerationWatch);
+        updateAcceleration({
+            x : "",
+            y : "",
+            z : ""
+        });
+        accelerationWatch = null;
+    } else {
+        var options = {};
+        options.frequency = 1000;
+        accelerationWatch = navigator.accelerometer.watchAcceleration(
+                updateAcceleration, function(ex) {
+                    alert("accel fail (" + ex.name + ": " + ex.message + ")");
+                }, options);
+    }
+};
+
+var preventBehavior = function(e) {
+    e.preventDefault();
+};
+
+function dump_pic(data) {
+    var viewport = document.getElementById('viewport');
+    console.log(data);
+    viewport.style.display = "";
+    viewport.style.position = "absolute";
+    viewport.style.top = "10px";
+    viewport.style.left = "10px";
+    document.getElementById("test_img").src = "data:image/jpeg;base64," + data;
+}
+
+function fail(msg) {
+    alert(msg);
+}
+
+function show_pic() {
+    navigator.camera.getPicture(dump_pic, fail, {
+        quality : 50
+    });
+}
+
+function close() {
+    var viewport = document.getElementById('viewport');
+    viewport.style.position = "relative";
+    viewport.style.display = "none";
+}
+
+function contacts_success(contacts) {
+    alert(contacts.length
+            + ' contacts returned.'
+            + (contacts[2] && contacts[2].name ? (' Third contact is ' + contacts[2].name.formatted)
+                    : ''));
+}
+
+function get_contacts() {
+    var obj = new ContactFindOptions();
+    obj.filter = "";
+    obj.multiple = true;
+    navigator.contacts.find(
+            [ "displayName", "name" ], contacts_success,
+            fail, obj);
+}
+
+function check_network() {
+    var networkState = navigator.network.connection.type;
+
+    var states = {};
+    states[Connection.UNKNOWN]  = 'Unknown connection';
+    states[Connection.ETHERNET] = 'Ethernet connection';
+    states[Connection.WIFI]     = 'WiFi connection';
+    states[Connection.CELL_2G]  = 'Cell 2G connection';
+    states[Connection.CELL_3G]  = 'Cell 3G connection';
+    states[Connection.CELL_4G]  = 'Cell 4G connection';
+    states[Connection.NONE]     = 'No network connection';
+
+    confirm('Connection type:\n ' + states[networkState]);
+}
+
+var watchID = null;
+
+function updateHeading(h) {
+    document.getElementById('h').innerHTML = h.magneticHeading;
+}
+
+function toggleCompass() {
+    if (watchID !== null) {
+        navigator.compass.clearWatch(watchID);
+        watchID = null;
+        updateHeading({ magneticHeading : "Off"});
+    } else {        
+        var options = { frequency: 1000 };
+        watchID = navigator.compass.watchHeading(updateHeading, function(e) {
+            alert('Compass Error: ' + e.code);
+        }, options);
+    }
+}
+
+function init() {
+    // the next line makes it impossible to see Contacts on the HTC Evo since it
+    // doesn't have a scroll button
+    // document.addEventListener("touchmove", preventBehavior, false);
+    document.addEventListener("deviceready", deviceInfo, true);
+}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/templates/project/assets/www/master.css
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/templates/project/assets/www/master.css b/bin/templates/project/cordova/templates/project/assets/www/master.css
new file mode 100644
index 0000000..d4401f5
--- /dev/null
+++ b/bin/templates/project/cordova/templates/project/assets/www/master.css
@@ -0,0 +1,96 @@
+  body {
+    background:#222 none repeat scroll 0 0;
+    color:#666;
+    font-family:Helvetica;
+    font-size:72%;
+    line-height:1.5em;
+    margin:0;
+    border-top:1px solid #393939;
+  }
+
+  #info{
+    background:#ffa;
+    border: 1px solid #ffd324;
+    -webkit-border-radius: 5px;
+    border-radius: 5px;
+    clear:both;
+    margin:15px 6px 0;
+    width:295px;
+    padding:4px 0px 2px 10px;
+  }
+  
+  #info > h4{
+    font-size:.95em;
+    margin:5px 0;
+  }
+ 	
+  #stage.theme{
+    padding-top:3px;
+  }
+
+  /* Definition List */
+  #stage.theme > dl{
+  	padding-top:10px;
+  	clear:both;
+  	margin:0;
+  	list-style-type:none;
+  	padding-left:10px;
+  	overflow:auto;
+  }
+
+  #stage.theme > dl > dt{
+  	font-weight:bold;
+  	float:left;
+  	margin-left:5px;
+  }
+
+  #stage.theme > dl > dd{
+  	width:45px;
+  	float:left;
+  	color:#a87;
+  	font-weight:bold;
+  }
+
+  /* Content Styling */
+  #stage.theme > h1, #stage.theme > h2, #stage.theme > p{
+    margin:1em 0 .5em 13px;
+  }
+
+  #stage.theme > h1{
+    color:#eee;
+    font-size:1.6em;
+    text-align:center;
+    margin:0;
+    margin-top:15px;
+    padding:0;
+  }
+
+  #stage.theme > h2{
+  	clear:both;
+    margin:0;
+    padding:3px;
+    font-size:1em;
+    text-align:center;
+  }
+
+  /* Stage Buttons */
+  #stage.theme a.btn{
+  	border: 1px solid #555;
+  	-webkit-border-radius: 5px;
+  	border-radius: 5px;
+  	text-align:center;
+  	display:block;
+  	float:left;
+  	background:#444;
+  	width:150px;
+  	color:#9ab;
+  	font-size:1.1em;
+  	text-decoration:none;
+  	padding:1.2em 0;
+  	margin:3px 0px 3px 5px;
+  }
+  #stage.theme a.btn.large{
+  	width:308px;
+  	padding:1.2em 0;
+  }
+

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/templates/project/res/drawable/icon.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/templates/project/res/drawable/icon.png b/bin/templates/project/cordova/templates/project/res/drawable/icon.png
new file mode 100755
index 0000000..697df7f
Binary files /dev/null and b/bin/templates/project/cordova/templates/project/res/drawable/icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/templates/project/res/xml/cordova.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/templates/project/res/xml/cordova.xml b/bin/templates/project/cordova/templates/project/res/xml/cordova.xml
new file mode 100755
index 0000000..c7b5000
--- /dev/null
+++ b/bin/templates/project/cordova/templates/project/res/xml/cordova.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<cordova>
+    <access origin="http://127.0.0.1*"/>
+    <log level="DEBUG"/>
+</cordova>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/cordova/templates/project/res/xml/plugins.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/templates/project/res/xml/plugins.xml b/bin/templates/project/cordova/templates/project/res/xml/plugins.xml
new file mode 100644
index 0000000..4c651ee
--- /dev/null
+++ b/bin/templates/project/cordova/templates/project/res/xml/plugins.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<plugins>
+    <plugin name="App" value="org.apache.cordova.App"/>
+    <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
+    <plugin name="Device" value="org.apache.cordova.Device"/>
+    <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
+    <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
+    <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
+    <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
+    <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
+    <plugin name="File" value="org.apache.cordova.FileUtils"/>
+    <plugin name="Network Status" value="org.apache.cordova.NetworkManager"/>
+    <plugin name="Notification" value="org.apache.cordova.Notification"/>
+    <plugin name="Storage" value="org.apache.cordova.Storage"/>
+    <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
+    <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
+    <plugin name="Capture" value="org.apache.cordova.Capture"/>
+    <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
+</plugins>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/create
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/create b/bin/templates/project/phonegap/create
deleted file mode 100755
index 076424a..0000000
--- a/bin/templates/project/phonegap/create
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-#
-# create a phonegap/android project
-# 
-# USAGE
-#   ./create [path package activity]
-#
-
-# load up the config
-. ./.phonegap/config
-
-PACKAGE_AS_PATH=$(echo $PACKAGE | sed 's/\./\//g')
-ACTIVITY_PATH=./src/$PACKAGE_AS_PATH/$ACTIVITY.java
-MANIFEST_PATH=./AndroidManifest.xml
-
-# create the project
-android create project --target $TARGET --path . --package $PACKAGE --activity $ACTIVITY
-
-# copy all the phonegap scripts etc in there
-cp -R ./phonegap/templates/project/* .
-
-# copy in phonegap.js
-cp ./.phonegap/android/phonegap-$VERSION.js ./assets/www
-
-# copy in phonegap.jar
-cp ./.phonegap/android/phonegap-$VERSION.jar ./libs
-
-# copy in default activity
-cat ./phonegap/templates/Activity.java > $ACTIVITY_PATH
-
-# interpolate the acivity name and package
-find "$ACTIVITY_PATH" | xargs grep '__ACTIVITY__' -sl | xargs -L1 sed -i -e "s/__ACTIVITY__/${ACTIVITY}/g"
-find "$ACTIVITY_PATH" | xargs grep '__ID__' -sl | xargs -L1 sed -i -e "s/__ID__/${PACKAGE}/g"
-
-find "$MANIFEST_PATH" | xargs grep '__ACTIVITY__' -sl | xargs -L1 sed -i -e "s/__ACTIVITY__/${ACTIVITY}/g"
-find "$MANIFEST_PATH" | xargs grep '__PACKAGE__' -sl | xargs -L1 sed -i -e "s/__PACKAGE__/${PACKAGE}/g"

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/debug
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/debug b/bin/templates/project/phonegap/debug
deleted file mode 100755
index bfa3df1..0000000
--- a/bin/templates/project/phonegap/debug
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /bin/sh
-
-. ./.phonegap/config
-
-# if there are no devices listed then emulate
-
-
-ant debug install
-adb shell am start -n $PACKAGE/$PACKAGE.$ACTIVITY

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/emulate
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/emulate b/bin/templates/project/phonegap/emulate
deleted file mode 100755
index 21d7b9c..0000000
--- a/bin/templates/project/phonegap/emulate
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-#Available Android Virtual Devices:
-#    Name: default
-#    Path: /Users/davejohnson/.android/avd/default.avd
-#  Target: Android 2.2 (API level 8)
-#    Skin: WVGA800
-#  Sdcard: 100M
-
-# get the name of the first virtual device or use command line arg or use "default"
-
-emulator -cpu-delay 0 -no-boot-anim -cache ./tmp/cache -avd default > /dev/null 2>&1 & # put the avd's chatty ass in the background
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/log
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/log b/bin/templates/project/phonegap/log
deleted file mode 100755
index 2ff1e3a..0000000
--- a/bin/templates/project/phonegap/log
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh 
-
-adb logcat

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/templates/Activity.java
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/templates/Activity.java b/bin/templates/project/phonegap/templates/Activity.java
deleted file mode 100644
index 54e2707..0000000
--- a/bin/templates/project/phonegap/templates/Activity.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package __ID__;
-
-import android.app.Activity;
-import android.os.Bundle;
-import com.phonegap.*;
-
-public class __ACTIVITY__ extends DroidGap
-{
-    @Override
-    public void onCreate(Bundle savedInstanceState)
-    {
-        super.onCreate(savedInstanceState);
-        super.loadUrl("file:///android_asset/www/index.html");
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/templates/project/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/templates/project/AndroidManifest.xml b/bin/templates/project/phonegap/templates/project/AndroidManifest.xml
deleted file mode 100644
index 2269f37..0000000
--- a/bin/templates/project/phonegap/templates/project/AndroidManifest.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
-      package="__PACKAGE__" android:versionName="1.1" android:versionCode="5">
-    <supports-screens
-    	android:largeScreens="true"
-    	android:normalScreens="true"
-    	android:smallScreens="true"
-    	android:xlargeScreens="true"
-    	android:resizeable="true"
-    	android:anyDensity="true"
-    	/>
-
-    <uses-permission android:name="android.permission.CAMERA" />
-    <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.RECEIVE_SMS" />
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
-    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
-    <uses-permission android:name="android.permission.READ_CONTACTS" />
-    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
-    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-
-    <uses-feature android:name="android.hardware.camera" />
-    <uses-feature android:name="android.hardware.camera.autofocus" />
-
-    <application android:icon="@drawable/icon" android:label="@string/app_name"
-    	android:debuggable="true">
-		<activity android:name="__ACTIVITY__" android:label="@string/app_name" 
-				  android:configChanges="orientation|keyboardHidden">
-			<intent-filter>
-				<action android:name="android.intent.action.MAIN" />
-				<category android:name="android.intent.category.LAUNCHER" />
-			</intent-filter>
-        </activity>
-        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
-            	  android:configChanges="orientation|keyboardHidden">
-        	<intent-filter>
-        	</intent-filter>
-        </activity>
-    </application>
-
-	<uses-sdk android:minSdkVersion="5" />
-</manifest> 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/templates/project/assets/www/index.html
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/templates/project/assets/www/index.html b/bin/templates/project/phonegap/templates/project/assets/www/index.html
deleted file mode 100644
index bfe03d6..0000000
--- a/bin/templates/project/phonegap/templates/project/assets/www/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-  <head>
-    <meta name="viewport" content="width=320; user-scalable=no" />
-    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
-    <title>PhoneGap</title>
-	  <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title">
-	  <script type="text/javascript" charset="utf-8" src="phonegap-1.4.1.js"></script>
-	  <script type="text/javascript" charset="utf-8" src="main.js"></script>
-
-  </head>
-  <body onload="init();" id="stage" class="theme">
-    <h1>Welcome to PhoneGap!</h1>
-    <h2>this file is located at assets/www/index.html</h2>
-    <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
-     </div>
-    <dl id="accel-data">
-      <dt>X:</dt><dd id="x">&nbsp;</dd>
-      <dt>Y:</dt><dd id="y">&nbsp;</dd>
-      <dt>Z:</dt><dd id="z">&nbsp;</dd>
-    </dl>
-    <a href="#" class="btn large" onclick="toggleAccel();">Toggle Accelerometer</a>
-    <a href="#" class="btn large" onclick="getLocation();">Get Location</a>
-	<a href="tel:411" class="btn large">Call 411</a>
-    <a href="#" class="btn large" onclick="beep();">Beep</a>
-    <a href="#" class="btn large" onclick="vibrate();">Vibrate</a>
-    <a href="#" class="btn large" onclick="show_pic();">Get a Picture</a>
-    <a href="#" class="btn large" onclick="get_contacts();return false;">Get Phone's Contacts</a>
-    <a href="#" class="btn large" onclick="check_network();return false;">Check Network</a>
-    <dl>
-	<dt>Compass Heading:</dt><dd id="h">Off</dd>
-    </dl>
-    <a href="#" class="btn large" onclick="toggleCompass();return false;">Toggle Compass</a>
-    <div id="viewport" class="viewport" style="display: none;">
-      <img style="width:60px;height:60px" id="test_img" src="" />
-    </div>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/templates/project/assets/www/main.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/templates/project/assets/www/main.js b/bin/templates/project/phonegap/templates/project/assets/www/main.js
deleted file mode 100644
index f631692..0000000
--- a/bin/templates/project/phonegap/templates/project/assets/www/main.js
+++ /dev/null
@@ -1,146 +0,0 @@
-var deviceInfo = function() {
-    document.getElementById("platform").innerHTML = device.platform;
-    document.getElementById("version").innerHTML = device.version;
-    document.getElementById("uuid").innerHTML = device.uuid;
-    document.getElementById("name").innerHTML = device.name;
-    document.getElementById("width").innerHTML = screen.width;
-    document.getElementById("height").innerHTML = screen.height;
-    document.getElementById("colorDepth").innerHTML = screen.colorDepth;
-};
-
-var getLocation = function() {
-    var suc = function(p) {
-        alert(p.coords.latitude + " " + p.coords.longitude);
-    };
-    var locFail = function() {
-    };
-    navigator.geolocation.getCurrentPosition(suc, locFail);
-};
-
-var beep = function() {
-    navigator.notification.beep(2);
-};
-
-var vibrate = function() {
-    navigator.notification.vibrate(0);
-};
-
-function roundNumber(num) {
-    var dec = 3;
-    var result = Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
-    return result;
-}
-
-var accelerationWatch = null;
-
-function updateAcceleration(a) {
-    document.getElementById('x').innerHTML = roundNumber(a.x);
-    document.getElementById('y').innerHTML = roundNumber(a.y);
-    document.getElementById('z').innerHTML = roundNumber(a.z);
-}
-
-var toggleAccel = function() {
-    if (accelerationWatch !== null) {
-        navigator.accelerometer.clearWatch(accelerationWatch);
-        updateAcceleration({
-            x : "",
-            y : "",
-            z : ""
-        });
-        accelerationWatch = null;
-    } else {
-        var options = {};
-        options.frequency = 1000;
-        accelerationWatch = navigator.accelerometer.watchAcceleration(
-                updateAcceleration, function(ex) {
-                    alert("accel fail (" + ex.name + ": " + ex.message + ")");
-                }, options);
-    }
-};
-
-var preventBehavior = function(e) {
-    e.preventDefault();
-};
-
-function dump_pic(data) {
-    var viewport = document.getElementById('viewport');
-    console.log(data);
-    viewport.style.display = "";
-    viewport.style.position = "absolute";
-    viewport.style.top = "10px";
-    viewport.style.left = "10px";
-    document.getElementById("test_img").src = "data:image/jpeg;base64," + data;
-}
-
-function fail(msg) {
-    alert(msg);
-}
-
-function show_pic() {
-    navigator.camera.getPicture(dump_pic, fail, {
-        quality : 50
-    });
-}
-
-function close() {
-    var viewport = document.getElementById('viewport');
-    viewport.style.position = "relative";
-    viewport.style.display = "none";
-}
-
-function contacts_success(contacts) {
-    alert(contacts.length
-            + ' contacts returned.'
-            + (contacts[2] && contacts[2].name ? (' Third contact is ' + contacts[2].name.formatted)
-                    : ''));
-}
-
-function get_contacts() {
-    var obj = new ContactFindOptions();
-    obj.filter = "";
-    obj.multiple = true;
-    navigator.contacts.find(
-            [ "displayName", "name" ], contacts_success,
-            fail, obj);
-}
-
-function check_network() {
-    var networkState = navigator.network.connection.type;
-
-    var states = {};
-    states[Connection.UNKNOWN]  = 'Unknown connection';
-    states[Connection.ETHERNET] = 'Ethernet connection';
-    states[Connection.WIFI]     = 'WiFi connection';
-    states[Connection.CELL_2G]  = 'Cell 2G connection';
-    states[Connection.CELL_3G]  = 'Cell 3G connection';
-    states[Connection.CELL_4G]  = 'Cell 4G connection';
-    states[Connection.NONE]     = 'No network connection';
-
-    confirm('Connection type:\n ' + states[networkState]);
-}
-
-var watchID = null;
-
-function updateHeading(h) {
-    document.getElementById('h').innerHTML = h.magneticHeading;
-}
-
-function toggleCompass() {
-    if (watchID !== null) {
-        navigator.compass.clearWatch(watchID);
-        watchID = null;
-        updateHeading({ magneticHeading : "Off"});
-    } else {        
-        var options = { frequency: 1000 };
-        watchID = navigator.compass.watchHeading(updateHeading, function(e) {
-            alert('Compass Error: ' + e.code);
-        }, options);
-    }
-}
-
-function init() {
-    // the next line makes it impossible to see Contacts on the HTC Evo since it
-    // doesn't have a scroll button
-    // document.addEventListener("touchmove", preventBehavior, false);
-    document.addEventListener("deviceready", deviceInfo, true);
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/templates/project/assets/www/master.css
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/templates/project/assets/www/master.css b/bin/templates/project/phonegap/templates/project/assets/www/master.css
deleted file mode 100644
index d4401f5..0000000
--- a/bin/templates/project/phonegap/templates/project/assets/www/master.css
+++ /dev/null
@@ -1,96 +0,0 @@
-  body {
-    background:#222 none repeat scroll 0 0;
-    color:#666;
-    font-family:Helvetica;
-    font-size:72%;
-    line-height:1.5em;
-    margin:0;
-    border-top:1px solid #393939;
-  }
-
-  #info{
-    background:#ffa;
-    border: 1px solid #ffd324;
-    -webkit-border-radius: 5px;
-    border-radius: 5px;
-    clear:both;
-    margin:15px 6px 0;
-    width:295px;
-    padding:4px 0px 2px 10px;
-  }
-  
-  #info > h4{
-    font-size:.95em;
-    margin:5px 0;
-  }
- 	
-  #stage.theme{
-    padding-top:3px;
-  }
-
-  /* Definition List */
-  #stage.theme > dl{
-  	padding-top:10px;
-  	clear:both;
-  	margin:0;
-  	list-style-type:none;
-  	padding-left:10px;
-  	overflow:auto;
-  }
-
-  #stage.theme > dl > dt{
-  	font-weight:bold;
-  	float:left;
-  	margin-left:5px;
-  }
-
-  #stage.theme > dl > dd{
-  	width:45px;
-  	float:left;
-  	color:#a87;
-  	font-weight:bold;
-  }
-
-  /* Content Styling */
-  #stage.theme > h1, #stage.theme > h2, #stage.theme > p{
-    margin:1em 0 .5em 13px;
-  }
-
-  #stage.theme > h1{
-    color:#eee;
-    font-size:1.6em;
-    text-align:center;
-    margin:0;
-    margin-top:15px;
-    padding:0;
-  }
-
-  #stage.theme > h2{
-  	clear:both;
-    margin:0;
-    padding:3px;
-    font-size:1em;
-    text-align:center;
-  }
-
-  /* Stage Buttons */
-  #stage.theme a.btn{
-  	border: 1px solid #555;
-  	-webkit-border-radius: 5px;
-  	border-radius: 5px;
-  	text-align:center;
-  	display:block;
-  	float:left;
-  	background:#444;
-  	width:150px;
-  	color:#9ab;
-  	font-size:1.1em;
-  	text-decoration:none;
-  	padding:1.2em 0;
-  	margin:3px 0px 3px 5px;
-  }
-  #stage.theme a.btn.large{
-  	width:308px;
-  	padding:1.2em 0;
-  }
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/templates/project/res/drawable/icon.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/templates/project/res/drawable/icon.png b/bin/templates/project/phonegap/templates/project/res/drawable/icon.png
deleted file mode 100755
index 697df7f..0000000
Binary files a/bin/templates/project/phonegap/templates/project/res/drawable/icon.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/templates/project/res/xml/phonegap.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/templates/project/res/xml/phonegap.xml b/bin/templates/project/phonegap/templates/project/res/xml/phonegap.xml
deleted file mode 100755
index 97f31ea..0000000
--- a/bin/templates/project/phonegap/templates/project/res/xml/phonegap.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<phonegap>
-    <access origin="http://127.0.0.1*"/>
-    <log level="DEBUG"/>
-</phonegap>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/templates/project/phonegap/templates/project/res/xml/plugins.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/phonegap/templates/project/res/xml/plugins.xml b/bin/templates/project/phonegap/templates/project/res/xml/plugins.xml
deleted file mode 100644
index 3d8d48d..0000000
--- a/bin/templates/project/phonegap/templates/project/res/xml/plugins.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<plugins>
-    <plugin name="App" value="com.phonegap.App"/>
-    <plugin name="Geolocation" value="com.phonegap.GeoBroker"/>
-    <plugin name="Device" value="com.phonegap.Device"/>
-    <plugin name="Accelerometer" value="com.phonegap.AccelListener"/>
-    <plugin name="Compass" value="com.phonegap.CompassListener"/>
-    <plugin name="Media" value="com.phonegap.AudioHandler"/>
-    <plugin name="Camera" value="com.phonegap.CameraLauncher"/>
-    <plugin name="Contacts" value="com.phonegap.ContactManager"/>
-    <plugin name="Crypto" value="com.phonegap.CryptoHandler"/>
-    <plugin name="File" value="com.phonegap.FileUtils"/>
-    <plugin name="Network Status" value="com.phonegap.NetworkManager"/>
-    <plugin name="Notification" value="com.phonegap.Notification"/>
-    <plugin name="Storage" value="com.phonegap.Storage"/>
-    <plugin name="Temperature" value="com.phonegap.TempListener"/>
-    <plugin name="FileTransfer" value="com.phonegap.FileTransfer"/>
-    <plugin name="Capture" value="com.phonegap.Capture"/>
-</plugins>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/test
----------------------------------------------------------------------
diff --git a/bin/test b/bin/test
index 226edd2..abd97aa 100755
--- a/bin/test
+++ b/bin/test
@@ -13,14 +13,14 @@ then
 fi
 
 # generate a working proj
-./bin/create ./test com.phonegap.test PhoneGapTest
+./bin/create ./test org.apache.cordova.test CordovaTest
 
 # kill the default app and replace it w/ mobile-spec
 rm -rf ./test/assets/www
 mv ./callback-test ./test/assets/www
 
-# copy in phonegap.js since www dir was replaced above
-cp ./framework/assets/www/phonegap-$VERSION.js ./test/assets/www/phonegap-$VERSION.js
+# copy in cordova.js since www dir was replaced above
+cp ./framework/assets/www/cordova-$VERSION.js ./test/assets/www/cordova-$VERSION.js
 
 # build it, launch it and start logging on stdout
-cd ./test && ./phonegap/debug && ./phonegap/log
+cd ./test && ./cordova/debug && ./cordova/log

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/bin/tests/create.coffee
----------------------------------------------------------------------
diff --git a/bin/tests/create.coffee b/bin/tests/create.coffee
index 746e07b..0ed37ef 100644
--- a/bin/tests/create.coffee
+++ b/bin/tests/create.coffee
@@ -8,14 +8,14 @@ exports['default example project is generated'] = (test) ->
     test.ok true, "this assertion should pass" unless error?
     test.done()
 
-exports['default example project has a ./.phonegap folder'] = (test) ->
+exports['default example project has a ./.cordova folder'] = (test) ->
   test.expect 1
-  path.exists './example/.phonegap', (exists) ->
-    test.ok exists, 'the phonegap folder exists'
+  path.exists './example/.cordova', (exists) ->
+    test.ok exists, 'the cordova folder exists'
     test.done()
 
-exports['default example project has a /phonegap folder'] = (test) ->
+exports['default example project has a /cordova folder'] = (test) ->
   test.expect 1
-  path.exists './example/phonegap', (exists) ->
-    test.ok exists, 'the other phonegap folder exists'
+  path.exists './example/cordova', (exists) ->
+    test.ok exists, 'the other cordova folder exists'
     test.done()

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/framework/.project
----------------------------------------------------------------------
diff --git a/framework/.project b/framework/.project
index 16f5706..56d6763 100644
--- a/framework/.project
+++ b/framework/.project
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>PhoneGap</name>
+	<name>Cordova</name>
 	<comment></comment>
 	<projects>
 	</projects>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/framework/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/framework/AndroidManifest.xml b/framework/AndroidManifest.xml
index c0cbc94..ca70fd0 100755
--- a/framework/AndroidManifest.xml
+++ b/framework/AndroidManifest.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
-      package="com.phonegap" android:versionName="1.1" android:versionCode="5">
+      package="org.apache.cordova" android:versionName="1.1" android:versionCode="5">
     <supports-screens
         android:largeScreens="true"
         android:normalScreens="true"
@@ -39,7 +39,7 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name" 
+        <activity android:name="org.apache.cordova.DroidGap" android:label="@string/app_name" 
                   android:configChanges="orientation|keyboardHidden">
             <intent-filter>
             </intent-filter>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/framework/assets/js/accelerometer.js
----------------------------------------------------------------------
diff --git a/framework/assets/js/accelerometer.js b/framework/assets/js/accelerometer.js
index 7816c8b..ce994c5 100755
--- a/framework/assets/js/accelerometer.js
+++ b/framework/assets/js/accelerometer.js
@@ -17,8 +17,8 @@
  *     under the License.
  */
 
-if (!PhoneGap.hasResource("accelerometer")) {
-PhoneGap.addResource("accelerometer");
+if (!Cordova.hasResource("accelerometer")) {
+Cordova.addResource("accelerometer");
 
 /** @constructor */
 var Acceleration = function(x, y, z) {
@@ -69,7 +69,7 @@ Accelerometer.prototype.getCurrentAcceleration = function(successCallback, error
     }
 
     // Get acceleration
-    PhoneGap.exec(successCallback, errorCallback, "Accelerometer", "getAcceleration", []);
+    Cordova.exec(successCallback, errorCallback, "Accelerometer", "getAcceleration", []);
 };
 
 /**
@@ -98,18 +98,18 @@ Accelerometer.prototype.watchAcceleration = function(successCallback, errorCallb
     }
 
     // Make sure accelerometer timeout > frequency + 10 sec
-    PhoneGap.exec(
+    Cordova.exec(
         function(timeout) {
             if (timeout < (frequency + 10000)) {
-                PhoneGap.exec(null, null, "Accelerometer", "setTimeout", [frequency + 10000]);
+                Cordova.exec(null, null, "Accelerometer", "setTimeout", [frequency + 10000]);
             }
         },
         function(e) { }, "Accelerometer", "getTimeout", []);
 
     // Start watch timer
-    var id = PhoneGap.createUUID();
+    var id = Cordova.createUUID();
     navigator.accelerometer.timers[id] = setInterval(function() {
-        PhoneGap.exec(successCallback, errorCallback, "Accelerometer", "getAcceleration", []);
+        Cordova.exec(successCallback, errorCallback, "Accelerometer", "getAcceleration", []);
     }, (frequency ? frequency : 1));
 
     return id;
@@ -129,7 +129,7 @@ Accelerometer.prototype.clearWatch = function(id) {
     }
 };
 
-PhoneGap.addConstructor(function() {
+Cordova.addConstructor(function() {
     if (typeof navigator.accelerometer === "undefined") {
         navigator.accelerometer = new Accelerometer();
     }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/framework/assets/js/app.js
----------------------------------------------------------------------
diff --git a/framework/assets/js/app.js b/framework/assets/js/app.js
index 4eea08e..2462c9a 100755
--- a/framework/assets/js/app.js
+++ b/framework/assets/js/app.js
@@ -17,8 +17,8 @@
  *     under the License.
  */
 
-if (!PhoneGap.hasResource("app")) {
-PhoneGap.addResource("app");
+if (!Cordova.hasResource("app")) {
+Cordova.addResource("app");
 (function() {
 
 /**
@@ -31,7 +31,7 @@ var App = function() {};
  * Clear the resource cache.
  */
 App.prototype.clearCache = function() {
-    PhoneGap.exec(null, null, "App", "clearCache", []);
+    Cordova.exec(null, null, "App", "clearCache", []);
 };
 
 /**
@@ -49,14 +49,14 @@ App.prototype.clearCache = function() {
  *      navigator.app.loadUrl("http://server/myapp/index.html", {wait:2000, loadingDialog:"Wait,Loading App", loadUrlTimeoutValue: 60000});
  */
 App.prototype.loadUrl = function(url, props) {
-    PhoneGap.exec(null, null, "App", "loadUrl", [url, props]);
+    Cordova.exec(null, null, "App", "loadUrl", [url, props]);
 };
 
 /**
  * Cancel loadUrl that is waiting to be loaded.
  */
 App.prototype.cancelLoadUrl = function() {
-    PhoneGap.exec(null, null, "App", "cancelLoadUrl", []);
+    Cordova.exec(null, null, "App", "cancelLoadUrl", []);
 };
 
 /**
@@ -64,7 +64,7 @@ App.prototype.cancelLoadUrl = function() {
  * Instead of BACK button loading the previous web page, it will exit the app.
  */
 App.prototype.clearHistory = function() {
-    PhoneGap.exec(null, null, "App", "clearHistory", []);
+    Cordova.exec(null, null, "App", "clearHistory", []);
 };
 
 /**
@@ -72,17 +72,17 @@ App.prototype.clearHistory = function() {
  * This is the same as pressing the backbutton on Android device.
  */
 App.prototype.backHistory = function() {
-    PhoneGap.exec(null, null, "App", "backHistory", []);
+    Cordova.exec(null, null, "App", "backHistory", []);
 };
 
 /**
  * Exit and terminate the application.
  */
 App.prototype.exitApp = function() {
-	return PhoneGap.exec(null, null, "App", "exitApp", []);
+	return Cordova.exec(null, null, "App", "exitApp", []);
 };
 
-PhoneGap.addConstructor(function() {
+Cordova.addConstructor(function() {
     navigator.app = new App();
 });
 }());

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/framework/assets/js/battery.js
----------------------------------------------------------------------
diff --git a/framework/assets/js/battery.js b/framework/assets/js/battery.js
index 2723c49..c603a8d 100755
--- a/framework/assets/js/battery.js
+++ b/framework/assets/js/battery.js
@@ -17,8 +17,8 @@
  *     under the License.
  */
 
-if (!PhoneGap.hasResource("battery")) {
-PhoneGap.addResource("battery");
+if (!Cordova.hasResource("battery")) {
+Cordova.addResource("battery");
 
 /**
  * This class contains information about the current battery status.
@@ -44,7 +44,7 @@ Battery.prototype.eventHandler = function(eventType, handler, add) {
     if (add) {
         // If there are no current registered event listeners start the battery listener on native side.
         if (me._batteryListener.length === 0 && me._lowListener.length === 0 && me._criticalListener.length === 0) {
-            PhoneGap.exec(me._status, me._error, "Battery", "start", []);
+            Cordova.exec(me._status, me._error, "Battery", "start", []);
         }
         
         // Register the event listener in the proper array
@@ -83,7 +83,7 @@ Battery.prototype.eventHandler = function(eventType, handler, add) {
         
         // If there are no more registered event listeners stop the battery listener on native side.
         if (me._batteryListener.length === 0 && me._lowListener.length === 0 && me._criticalListener.length === 0) {
-            PhoneGap.exec(null, null, "Battery", "stop", []);
+            Cordova.exec(null, null, "Battery", "stop", []);
         }
     }
 };
@@ -99,15 +99,15 @@ Battery.prototype._status = function(info) {
         var level = info.level;
 		if (me._level !== level || me._isPlugged !== info.isPlugged) {
 			// Fire batterystatus event
-			PhoneGap.fireWindowEvent("batterystatus", info);
+			Cordova.fireWindowEvent("batterystatus", info);
 
 			// Fire low battery event
 			if (level === 20 || level === 5) {
 				if (level === 20) {
-					PhoneGap.fireWindowEvent("batterylow", info);
+					Cordova.fireWindowEvent("batterylow", info);
 				}
 				else {
-					PhoneGap.fireWindowEvent("batterycritical", info);
+					Cordova.fireWindowEvent("batterycritical", info);
 				}
 			}
 		}
@@ -123,12 +123,12 @@ Battery.prototype._error = function(e) {
     console.log("Error initializing Battery: " + e);
 };
 
-PhoneGap.addConstructor(function() {
+Cordova.addConstructor(function() {
     if (typeof navigator.battery === "undefined") {
         navigator.battery = new Battery();
-        PhoneGap.addWindowEventHandler("batterystatus", navigator.battery.eventHandler);
-        PhoneGap.addWindowEventHandler("batterylow", navigator.battery.eventHandler);
-        PhoneGap.addWindowEventHandler("batterycritical", navigator.battery.eventHandler);
+        Cordova.addWindowEventHandler("batterystatus", navigator.battery.eventHandler);
+        Cordova.addWindowEventHandler("batterylow", navigator.battery.eventHandler);
+        Cordova.addWindowEventHandler("batterycritical", navigator.battery.eventHandler);
     }
 });
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/framework/assets/js/camera.js
----------------------------------------------------------------------
diff --git a/framework/assets/js/camera.js b/framework/assets/js/camera.js
index e1467c6..31f2b3d 100755
--- a/framework/assets/js/camera.js
+++ b/framework/assets/js/camera.js
@@ -17,8 +17,8 @@
  *     under the License.
  */
 
-if (!PhoneGap.hasResource("camera")) {
-PhoneGap.addResource("camera");
+if (!Cordova.hasResource("camera")) {
+Cordova.addResource("camera");
 
 /**
  * This class provides access to the device camera.
@@ -157,10 +157,10 @@ Camera.prototype.getPicture = function(successCallback, errorCallback, options)
         }
     }
     
-    PhoneGap.exec(successCallback, errorCallback, "Camera", "takePicture", [options]);
+    Cordova.exec(successCallback, errorCallback, "Camera", "takePicture", [options]);
 };
 
-PhoneGap.addConstructor(function() {
+Cordova.addConstructor(function() {
     if (typeof navigator.camera === "undefined") {
         navigator.camera = new Camera();
     }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/framework/assets/js/capture.js
----------------------------------------------------------------------
diff --git a/framework/assets/js/capture.js b/framework/assets/js/capture.js
index 28ad367..ba44136 100644
--- a/framework/assets/js/capture.js
+++ b/framework/assets/js/capture.js
@@ -17,8 +17,8 @@
  *     under the License.
  */
 
-if (!PhoneGap.hasResource("capture")) {
-PhoneGap.addResource("capture");
+if (!Cordova.hasResource("capture")) {
+Cordova.addResource("capture");
 	
 /**
  * Represents a single file.
@@ -44,7 +44,7 @@ var MediaFile = function(name, fullPath, type, lastModifiedDate, size){
  * @param {Function} errorCB
  */
 MediaFile.prototype.getFormatData = function(successCallback, errorCallback){
-	PhoneGap.exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]);
+	Cordova.exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]);
 };
 
 /**
@@ -95,7 +95,7 @@ var Capture = function(){
  * @param {CaptureAudioOptions} options
  */
 Capture.prototype.captureAudio = function(successCallback, errorCallback, options){
-	PhoneGap.exec(successCallback, errorCallback, "Capture", "captureAudio", [options]);
+	Cordova.exec(successCallback, errorCallback, "Capture", "captureAudio", [options]);
 };
 
 /**
@@ -106,7 +106,7 @@ Capture.prototype.captureAudio = function(successCallback, errorCallback, option
  * @param {CaptureImageOptions} options
  */
 Capture.prototype.captureImage = function(successCallback, errorCallback, options){
-	PhoneGap.exec(successCallback, errorCallback, "Capture", "captureImage", [options]);
+	Cordova.exec(successCallback, errorCallback, "Capture", "captureImage", [options]);
 };
 
 /**
@@ -140,7 +140,7 @@ Capture.prototype._castMediaFile = function(pluginResult){
  * @param {CaptureVideoOptions} options
  */
 Capture.prototype.captureVideo = function(successCallback, errorCallback, options){
-	PhoneGap.exec(successCallback, errorCallback, "Capture", "captureVideo", [options]);
+	Cordova.exec(successCallback, errorCallback, "Capture", "captureVideo", [options]);
 };
 
 /**
@@ -191,7 +191,7 @@ var CaptureAudioOptions = function(){
 	this.mode = null;
 };
 
-PhoneGap.addConstructor(function(){
+Cordova.addConstructor(function(){
 	if (typeof navigator.device.capture === "undefined") {
 		navigator.device.capture = window.device.capture = new Capture();
 	}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/framework/assets/js/compass.js
----------------------------------------------------------------------
diff --git a/framework/assets/js/compass.js b/framework/assets/js/compass.js
index 6465516..b8c9e13 100755
--- a/framework/assets/js/compass.js
+++ b/framework/assets/js/compass.js
@@ -17,8 +17,8 @@
  *     under the License.
  */
 
-if (!PhoneGap.hasResource("compass")) {
-PhoneGap.addResource("compass");
+if (!Cordova.hasResource("compass")) {
+Cordova.addResource("compass");
 
 var CompassError = function(){
     this.code = null;
@@ -75,7 +75,7 @@ Compass.prototype.getCurrentHeading = function(successCallback, errorCallback, o
     }
 
     // Get heading
-    PhoneGap.exec(successCallback, errorCallback, "Compass", "getHeading", []);
+    Cordova.exec(successCallback, errorCallback, "Compass", "getHeading", []);
 };
 
 /**
@@ -104,19 +104,19 @@ Compass.prototype.watchHeading= function(successCallback, errorCallback, options
     }
 
     // Make sure compass timeout > frequency + 10 sec
-    PhoneGap.exec(
+    Cordova.exec(
         function(timeout) {
             if (timeout < (frequency + 10000)) {
-                PhoneGap.exec(null, null, "Compass", "setTimeout", [frequency + 10000]);
+                Cordova.exec(null, null, "Compass", "setTimeout", [frequency + 10000]);
             }
         },
         function(e) { }, "Compass", "getTimeout", []);
 
     // Start watch timer to get headings
-    var id = PhoneGap.createUUID();
+    var id = Cordova.createUUID();
     navigator.compass.timers[id] = setInterval(
         function() {
-            PhoneGap.exec(successCallback, errorCallback, "Compass", "getHeading", []);
+            Cordova.exec(successCallback, errorCallback, "Compass", "getHeading", []);
         }, (frequency ? frequency : 1));
 
     return id;
@@ -145,7 +145,7 @@ Compass.prototype._castDate = function(pluginResult) {
     return pluginResult;
 };
 
-PhoneGap.addConstructor(function() {
+Cordova.addConstructor(function() {
     if (typeof navigator.compass === "undefined") {
         navigator.compass = new Compass();
     }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/664a061d/framework/assets/js/contact.js
----------------------------------------------------------------------
diff --git a/framework/assets/js/contact.js b/framework/assets/js/contact.js
index 8d87811..a4d7823 100755
--- a/framework/assets/js/contact.js
+++ b/framework/assets/js/contact.js
@@ -17,8 +17,8 @@
  *     under the License.
  */
 
-if (!PhoneGap.hasResource("contact")) {
-PhoneGap.addResource("contact");
+if (!Cordova.hasResource("contact")) {
+Cordova.addResource("contact");
 
 /**
 * Contains information about a single contact.
@@ -89,7 +89,7 @@ Contact.prototype.remove = function(successCB, errorCB) {
         errorCB(errorObj);
     }
     else {
-        PhoneGap.exec(successCB, errorCB, "Contacts", "remove", [this.id]);
+        Cordova.exec(successCB, errorCB, "Contacts", "remove", [this.id]);
     }
 };
 
@@ -99,7 +99,7 @@ Contact.prototype.remove = function(successCB, errorCB) {
 * @return copy of this Contact
 */
 Contact.prototype.clone = function() {
-    var clonedContact = PhoneGap.clone(this);
+    var clonedContact = Cordova.clone(this);
     var i;
     clonedContact.id = null;
     clonedContact.rawId = null;
@@ -153,7 +153,7 @@ Contact.prototype.clone = function() {
 * @param errorCB error callback
 */
 Contact.prototype.save = function(successCB, errorCB) {
-    PhoneGap.exec(successCB, errorCB, "Contacts", "save", [this]);
+    Cordova.exec(successCB, errorCB, "Contacts", "save", [this]);
 };
 
 /**
@@ -259,7 +259,7 @@ Contacts.prototype.find = function(fields, successCB, errorCB, options) {
             errorCB({"code": ContactError.INVALID_ARGUMENT_ERROR});
         }
     } else {
-        PhoneGap.exec(successCB, errorCB, "Contacts", "search", [fields, options]);        
+        Cordova.exec(successCB, errorCB, "Contacts", "search", [fields, options]);        
     }
 };
 
@@ -313,7 +313,7 @@ var ContactFindOptions = function(filter, multiple) {
 /**
  * Add the contact interface into the browser.
  */
-PhoneGap.addConstructor(function() {
+Cordova.addConstructor(function() {
     if(typeof navigator.contacts === "undefined") {
         navigator.contacts = new Contacts();
     }


Mime
View raw message