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... 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/bin/templates/project/phonegap/create b/bin/templates/project/phonegap/create index 553a5b55..076424a2 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 -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" 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 00000000..697df7f3 Binary files /dev/null and b/bin/templates/project/phonegap/templates/project/res/drawable/icon.png differ diff --git a/bin/templates/project/phonegap/templates/project/res/xml/phonegap.xml b/bin/templates/project/phonegap/templates/project/res/xml/phonegap.xml new file mode 100755 index 00000000..97f31ea1 --- /dev/null +++ b/bin/templates/project/phonegap/templates/project/res/xml/phonegap.xml @@ -0,0 +1,5 @@ + + + + + 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 diff --git a/framework/assets/js/phonegap.js.base b/framework/assets/js/phonegap.js.base index a5824b10..0bf4bcfd 100755 --- a/framework/assets/js/phonegap.js.base +++ b/framework/assets/js/phonegap.js.base @@ -17,6 +17,8 @@ * under the License. */ +// Version 1.2.0 + if (typeof PhoneGap === "undefined") { /** @@ -387,9 +389,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 ]); @@ -933,7 +932,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 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 2b15545f..cd044ba1 --- a/framework/src/com/phonegap/Device.java +++ b/framework/src/com/phonegap/Device.java @@ -29,7 +29,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