From d1ec1f769324116c0bc96be8af52f2d782dc76c5 Mon Sep 17 00:00:00 2001 From: Bryce Curtis Date: Mon, 31 Oct 2011 14:18:32 -0500 Subject: [PATCH 1/8] Don't fire resume at app startup. --- framework/assets/js/phonegap.js.base | 3 --- 1 file changed, 3 deletions(-) diff --git a/framework/assets/js/phonegap.js.base b/framework/assets/js/phonegap.js.base index 1e913c9c..9ece3429 100755 --- a/framework/assets/js/phonegap.js.base +++ b/framework/assets/js/phonegap.js.base @@ -376,9 +376,6 @@ PhoneGap.Channel.join(function() { prompt("", "gap_init:"); PhoneGap.onDeviceReady.fire(); - - // Fire the onresume event, since first one happens before JavaScript is loaded - PhoneGap.onResume.fire(); }, PhoneGap.deviceReadyChannelsArray); }, [ PhoneGap.onDOMContentLoaded, PhoneGap.onNativeReady ]); From fd07cfc4614992f920526acd46160594d1aa424d Mon Sep 17 00:00:00 2001 From: Bryce Curtis Date: Mon, 31 Oct 2011 17:29:08 -0500 Subject: [PATCH 2/8] Update version to 1.2.0. --- VERSION | 2 +- framework/assets/js/phonegap.js.base | 2 ++ framework/assets/www/index.html | 2 +- framework/src/com/phonegap/Device.java | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 framework/src/com/phonegap/Device.java diff --git a/VERSION b/VERSION index 9084fa2f..26aaba0e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.0 +1.2.0 diff --git a/framework/assets/js/phonegap.js.base b/framework/assets/js/phonegap.js.base index 9ece3429..b243dc7f 100755 --- a/framework/assets/js/phonegap.js.base +++ b/framework/assets/js/phonegap.js.base @@ -6,6 +6,8 @@ * Copyright (c) 2010-2011, IBM Corporation */ +// Version 1.2.0 + if (typeof PhoneGap === "undefined") { /** diff --git a/framework/assets/www/index.html b/framework/assets/www/index.html index 5751ed25..d75751c8 100644 --- a/framework/assets/www/index.html +++ b/framework/assets/www/index.html @@ -1,7 +1,7 @@ - + diff --git a/framework/src/com/phonegap/Device.java b/framework/src/com/phonegap/Device.java old mode 100644 new mode 100755 index b71845bf..c47177c9 --- a/framework/src/com/phonegap/Device.java +++ b/framework/src/com/phonegap/Device.java @@ -18,7 +18,7 @@ import android.provider.Settings; public class Device extends Plugin { - public static String phonegapVersion = "1.1.0"; // PhoneGap version + public static String phonegapVersion = "1.2.0"; // PhoneGap version public static String platform = "Android"; // Device OS public static String uuid; // Device UUID From e4a5000f9e46069465d52340962f58c8fb50c870 Mon Sep 17 00:00:00 2001 From: Bryce Curtis Date: Mon, 31 Oct 2011 20:39:42 -0500 Subject: [PATCH 3/8] This is an informative message, not an error message. It is normal to get this when leaving a page. --- framework/assets/js/phonegap.js.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/assets/js/phonegap.js.base b/framework/assets/js/phonegap.js.base index b243dc7f..64f0b272 100755 --- a/framework/assets/js/phonegap.js.base +++ b/framework/assets/js/phonegap.js.base @@ -921,7 +921,7 @@ PhoneGap.JSCallback = function() { // If server is stopping else if (xmlhttp.status === 503) { - console.log("JSCallback Error: Service unavailable. Stopping callbacks."); + console.log("JSCallback Server Closed: Stopping callbacks."); } // If request wasn't GET From 813637eb78cfddd370daf3255bb48a75143ffabd Mon Sep 17 00:00:00 2001 From: Bryce Curtis Date: Mon, 31 Oct 2011 20:45:38 -0500 Subject: [PATCH 4/8] Update to download and run callback-test repository. --- bin/test | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/test b/bin/test index 185a90db..226edd2d 100755 --- a/bin/test +++ b/bin/test @@ -4,7 +4,7 @@ set -e VERSION=$(cat ./VERSION) # get the latest mobile-spec -git clone git@github.com:phonegap/mobile-spec.git +git clone git@github.com:callback/callback-test.git # clobber test if it exists if [ -e ./test ] @@ -17,7 +17,10 @@ fi # kill the default app and replace it w/ mobile-spec rm -rf ./test/assets/www -mv ./mobile-spec ./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 # build it, launch it and start logging on stdout -cd ./test && ./bin/debug && ./bin/log +cd ./test && ./phonegap/debug && ./phonegap/log From 798d50208337c4e24240eb0d210a7fe0e9a036dd Mon Sep 17 00:00:00 2001 From: Bryce Curtis Date: Mon, 31 Oct 2011 20:46:22 -0500 Subject: [PATCH 5/8] Update for 1.2.0. --- .../templates/project/assets/www/index.html | 2 +- .../templates/project/res/drawable/icon.png | Bin 0 -> 5800 bytes .../templates/project/res/xml/phonegap.xml | 5 +++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 bin/templates/project/phonegap/templates/project/res/drawable/icon.png create mode 100755 bin/templates/project/phonegap/templates/project/res/xml/phonegap.xml diff --git a/bin/templates/project/phonegap/templates/project/assets/www/index.html b/bin/templates/project/phonegap/templates/project/assets/www/index.html index 2ed97039..e9e786d6 100644 --- a/bin/templates/project/phonegap/templates/project/assets/www/index.html +++ b/bin/templates/project/phonegap/templates/project/assets/www/index.html @@ -5,7 +5,7 @@ PhoneGap - + diff --git a/bin/templates/project/phonegap/templates/project/res/drawable/icon.png b/bin/templates/project/phonegap/templates/project/res/drawable/icon.png new file mode 100755 index 0000000000000000000000000000000000000000..697df7f37de3bc418dcee9409240eab4891e496d GIT binary patch literal 5800 zcmV;Z7FX$sP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iXA- z4K^yy<5HLa02U}oL_t(&-i@1Svt7q^o}ab4_de4dfQyL$Nr)l{KmaLFq9rRPDMoTC z#Zo!0Bu=IB5Bx7u{ww*C5BU^VoT`*kF=ZB`IFxOQq)2c834#NN8MxCK_RziZp?mLh zE(l5iYS%sIo?-XfYkJq)>&oCiz7=`+p8;YR0)UvMUkaE32qLn4uYqCtsgYh1%%FSQ z@B7!iPsA_-v-BYqK`>Sq*xlFCLYC{mzyu_HVfq>|0r8K#s{od6(BVi3A6{7pdik<+ z8}!1TK&MxsHXf_8gq_RSsY7Vs?_>K`)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g%G{J79>A9ZDAzC5>DtHa9oW-U95KFw{On4 zw%Z^AMWI + + + + From 9b5a63e8e4c891a3d9f6bd5ef9030e9c030f0f2f Mon Sep 17 00:00:00 2001 From: Bryce Curtis Date: Mon, 31 Oct 2011 21:14:05 -0500 Subject: [PATCH 6/8] Updated readme. --- README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) mode change 100644 => 100755 README.md diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 92c38d0b..59431ec0 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -PhoneGap/Android +PhoneGap Android === -PhoneGap/Android is an Android application library that allows for PhoneGap based projects to be built for the Android Platform. PhoneGap based applications are, at the core, an application written with web technology: HTML, CSS and JavaScript. +PhoneGap Android is an Android application library that allows for PhoneGap based projects to be built for the Android Platform. PhoneGap based applications are, at the core, an application written with web technology: HTML, CSS and JavaScript. Requires --- @@ -10,21 +10,21 @@ Requires - Apache ANT - Android SDK [http://developer.android.com](http://developer.android.com) -PhoneGap/Android Developer Tools +PhoneGap Android Developer Tools --- The PhoneGap developer tooling is split between general tooling and project level tooling. -Commands +General Commands - ./bin/create [path package activity] ... create the ./exmaple app or a phonegap/android project + ./bin/create [path package activity] ... create the ./example app or a phonegap android project ./bin/bench ............................ generate a bench proj ./bin/autotest ......................... test the cli tools ./bin/test ............................. run mobile-spec Project Commands -These commands live in a generated PhoneGap/Android project. +These commands live in a generated PhoneGap Android project. ./phonegap/debug [path] ..................... install to first device ./phonegap/emulate .......................... start avd (emulator) named default @@ -37,7 +37,7 @@ Start avd (emulator) named `default`: ./bin/emulate -Create the exmaple project and build it to the first device: +Create the example project and build it to the first device: ./bin/create cd example @@ -47,15 +47,17 @@ Start adb logcat (console.log calls output here): ./phonegap/log -Running the [phonegap/mobile-spec](http://github.com/phonegap/mobile-spec) tests: +Running the [callback/callback-test](http://github.com/callback/callback-test) tests: +--- ./bin/test -Create a new PhoneGap/Android Project +Creating a new PhoneGap Android Project +--- ./bin/create ~/Desktop/myapp com.phonegap.special MyApp -Importing a PhoneGap/Android Project into Eclipse +Importing a PhoneGap Android Project into Eclipse ---- 1. File > New > Project... From 546b33c9366b0ea395d288ba07d007cd2ceff55f Mon Sep 17 00:00:00 2001 From: nisc Date: Mon, 31 Oct 2011 14:15:05 +0100 Subject: [PATCH 7/8] Fixes to make example project build and compile On Ubuntu 11.04, that is. --- bin/templates/project/phonegap/create | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/templates/project/phonegap/create b/bin/templates/project/phonegap/create index 553a5b55..6e00e589 100755 --- a/bin/templates/project/phonegap/create +++ b/bin/templates/project/phonegap/create @@ -17,7 +17,7 @@ MANIFEST_PATH=./AndroidManifest.xml android create project --target $TARGET --path . --package $PACKAGE --activity $ACTIVITY # copy all the phonegap scripts etc in there -cp -R ./phonegap/templates/project/ . +cp -R ./phonegap/templates/project/* . # copy in phonegap.js cp ./.phonegap/android/phonegap-$VERSION.js ./assets/www @@ -29,8 +29,8 @@ cp ./.phonegap/android/phonegap-$VERSION.jar ./libs cat ./phonegap/templates/Activity.java > $ACTIVITY_PATH # interpolate the acivity name and package -find "$ACTIVITY_PATH" | xargs grep '__ACTIVITY__' -sl | xargs -L1 sed -i "" "s/__ACTIVITY__/${ACTIVITY}/g" -find "$ACTIVITY_PATH" | xargs grep '__ID__' -sl | xargs -L1 sed -i "" "s/__ID__/${PACKAGE}/g" +find "$ACTIVITY_PATH" | xargs grep '__ACTIVITY__' -sl | xargs -L1 sed -i "s/__ACTIVITY__/${ACTIVITY}/g" +find "$ACTIVITY_PATH" | xargs grep '__ID__' -sl | xargs -L1 sed -i "s/__ID__/${PACKAGE}/g" -find "$MANIFEST_PATH" | xargs grep '__ACTIVITY__' -sl | xargs -L1 sed -i "" "s/__ACTIVITY__/${ACTIVITY}/g" -find "$MANIFEST_PATH" | xargs grep '__PACKAGE__' -sl | xargs -L1 sed -i "" "s/__PACKAGE__/${PACKAGE}/g" +find "$MANIFEST_PATH" | xargs grep '__ACTIVITY__' -sl | xargs -L1 sed -i "s/__ACTIVITY__/${ACTIVITY}/g" +find "$MANIFEST_PATH" | xargs grep '__PACKAGE__' -sl | xargs -L1 sed -i "s/__PACKAGE__/${PACKAGE}/g" From 538cdb03fc346838fd18b9ffa796619438e71d65 Mon Sep 17 00:00:00 2001 From: Fil Maj Date: Wed, 2 Nov 2011 12:01:36 -0700 Subject: [PATCH 8/8] No -e caused the bash script to fail --- bin/templates/project/phonegap/create | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/templates/project/phonegap/create b/bin/templates/project/phonegap/create index 6e00e589..076424a2 100755 --- a/bin/templates/project/phonegap/create +++ b/bin/templates/project/phonegap/create @@ -29,8 +29,8 @@ cp ./.phonegap/android/phonegap-$VERSION.jar ./libs cat ./phonegap/templates/Activity.java > $ACTIVITY_PATH # interpolate the acivity name and package -find "$ACTIVITY_PATH" | xargs grep '__ACTIVITY__' -sl | xargs -L1 sed -i "s/__ACTIVITY__/${ACTIVITY}/g" -find "$ACTIVITY_PATH" | xargs grep '__ID__' -sl | xargs -L1 sed -i "s/__ID__/${PACKAGE}/g" +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 "s/__ACTIVITY__/${ACTIVITY}/g" -find "$MANIFEST_PATH" | xargs grep '__PACKAGE__' -sl | xargs -L1 sed -i "s/__PACKAGE__/${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"