mobile_template 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +28 -0
- data/Rakefile +3 -0
- data/bin/mobile_template +71 -0
- data/lib/mobile_template/version.rb +4 -0
- data/lib/mobile_template.rb +5 -0
- data/mobile_template.gemspec +21 -0
- data/templates/assets/Gemfile +4 -0
- data/templates/assets/config.rb +96 -0
- data/templates/assets/config.ru +4 -0
- data/templates/assets/source/images/vendor/ajax-loader.gif +0 -0
- data/templates/assets/source/images/vendor/ajax-loader.png +0 -0
- data/templates/assets/source/images/vendor/icons-18-black.png +0 -0
- data/templates/assets/source/images/vendor/icons-18-white.png +0 -0
- data/templates/assets/source/images/vendor/icons-36-black.png +0 -0
- data/templates/assets/source/images/vendor/icons-36-white.png +0 -0
- data/templates/assets/source/index.html.erb +2 -0
- data/templates/assets/source/javascripts/app/index.js.coffee +2 -0
- data/templates/assets/source/javascripts/application.js.coffee +5 -0
- data/templates/assets/source/javascripts/vendor/cordova.js +4841 -0
- data/templates/assets/source/javascripts/vendor/jquery.js +9267 -0
- data/templates/assets/source/javascripts/vendor/jquery.mobile.js +7410 -0
- data/templates/assets/source/layout.erb +24 -0
- data/templates/assets/source/stylesheets/application.css.scss +2 -0
- data/templates/assets/source/stylesheets/vendor/jquery.mobile.css.scss +1872 -0
- data/templates/cordova_android/.gitignore +18 -0
- data/templates/cordova_android/LICENSE +202 -0
- data/templates/cordova_android/NOTICE +5 -0
- data/templates/cordova_android/README.md +95 -0
- data/templates/cordova_android/VERSION +1 -0
- data/templates/cordova_android/bin/BOOM +4 -0
- data/templates/cordova_android/bin/autotest +2 -0
- data/templates/cordova_android/bin/bench +29 -0
- data/templates/cordova_android/bin/create +46 -0
- data/templates/cordova_android/bin/create.bat +1 -0
- data/templates/cordova_android/bin/create.js +88 -0
- data/templates/cordova_android/bin/create.xml +79 -0
- data/templates/cordova_android/bin/node_modules/.bin/cake +7 -0
- data/templates/cordova_android/bin/node_modules/.bin/coffee +7 -0
- data/templates/cordova_android/bin/node_modules/.bin/nodeunit +120 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/.npmignore +11 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/LICENSE +22 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/README +48 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/Rakefile +78 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/bin/cake +7 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/bin/coffee +7 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/extras/jsl.conf +44 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/browser.js +75 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/cake.js +76 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/coffee-script.js +135 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/command.js +301 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/grammar.js +591 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/helpers.js +66 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/index.js +8 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/lexer.js +656 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/nodes.js +2289 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/optparse.js +111 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/parser.js +676 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/repl.js +123 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/rewriter.js +363 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/lib/scope.js +120 -0
- data/templates/cordova_android/bin/node_modules/coffee-script/package.json +27 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/.gitignore +5 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/.npmignore +3 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/CONTRIBUTORS.md +60 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/LICENSE +19 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/Makefile +126 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/README.md +432 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/bin/nodeunit +120 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/bin/nodeunit.json +10 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/deps/async.js +623 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/deps/console.log.js +55 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/deps/ejs.js +125 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/deps/json2.js +483 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/examples/browser/nodeunit.js +1757 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/examples/browser/suite1.js +12 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/examples/browser/suite2.js +13 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/examples/browser/test.html +16 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/img/example_fail.png +0 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/img/example_pass.png +0 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/index.js +3 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/assert.js +316 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/core.js +260 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/nodeunit.js +82 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/browser.js +119 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/default.js +123 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/html.js +107 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/index.js +9 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/junit.js +183 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/minimal.js +112 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/skip_passed.js +105 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/track.js +48 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/types.js +187 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/lib/utils.js +209 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/man1/nodeunit.1 +95 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/nodelint.cfg +4 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/package.json +56 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/share/junit.xml.ejs +19 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/share/license.js +11 -0
- data/templates/cordova_android/bin/node_modules/nodeunit/share/nodeunit.css +70 -0
- data/templates/cordova_android/bin/templates/project/.cordova/android/readme.md +1 -0
- data/templates/cordova_android/bin/templates/project/.cordova/readme.md +3 -0
- data/templates/cordova_android/bin/templates/project/cordova/create +36 -0
- data/templates/cordova_android/bin/templates/project/cordova/debug +9 -0
- data/templates/cordova_android/bin/templates/project/cordova/emulate +12 -0
- data/templates/cordova_android/bin/templates/project/cordova/log +3 -0
- data/templates/cordova_android/bin/templates/project/cordova/templates/Activity.java +16 -0
- data/templates/cordova_android/bin/templates/project/cordova/templates/project/AndroidManifest.xml +50 -0
- data/templates/cordova_android/bin/templates/project/cordova/templates/project/assets/www/index.html +42 -0
- data/templates/cordova_android/bin/templates/project/cordova/templates/project/assets/www/main.js +146 -0
- data/templates/cordova_android/bin/templates/project/cordova/templates/project/assets/www/master.css +96 -0
- data/templates/cordova_android/bin/templates/project/cordova/templates/project/res/drawable/icon.png +0 -0
- data/templates/cordova_android/bin/templates/project/cordova/templates/project/res/xml/cordova.xml +5 -0
- data/templates/cordova_android/bin/templates/project/cordova/templates/project/res/xml/plugins.xml +19 -0
- data/templates/cordova_android/bin/test +26 -0
- data/templates/cordova_android/bin/tests/autotest.coffee +4 -0
- data/templates/cordova_android/bin/tests/create.coffee +21 -0
- data/templates/cordova_android/bin/tests/debug.coffee +0 -0
- data/templates/cordova_android/bin/tests/test.coffee +0 -0
- data/templates/cordova_android/framework/.classpath +8 -0
- data/templates/cordova_android/framework/.project +33 -0
- data/templates/cordova_android/framework/AndroidManifest.xml +68 -0
- data/templates/cordova_android/framework/ant.properties +34 -0
- data/templates/cordova_android/framework/assets/js/accelerometer.js +137 -0
- data/templates/cordova_android/framework/assets/js/app.js +89 -0
- data/templates/cordova_android/framework/assets/js/battery.js +134 -0
- data/templates/cordova_android/framework/assets/js/camera.js +168 -0
- data/templates/cordova_android/framework/assets/js/capture.js +203 -0
- data/templates/cordova_android/framework/assets/js/compass.js +168 -0
- data/templates/cordova_android/framework/assets/js/contact.js +310 -0
- data/templates/cordova_android/framework/assets/js/cordova.android.js +4841 -0
- data/templates/cordova_android/framework/assets/js/cordova.js.base +924 -0
- data/templates/cordova_android/framework/assets/js/crypto.js +54 -0
- data/templates/cordova_android/framework/assets/js/device.js +83 -0
- data/templates/cordova_android/framework/assets/js/file.js +1082 -0
- data/templates/cordova_android/framework/assets/js/filetransfer.js +125 -0
- data/templates/cordova_android/framework/assets/js/geolocation.js +209 -0
- data/templates/cordova_android/framework/assets/js/header.txt +19 -0
- data/templates/cordova_android/framework/assets/js/media.js +233 -0
- data/templates/cordova_android/framework/assets/js/network.js +100 -0
- data/templates/cordova_android/framework/assets/js/notification.js +133 -0
- data/templates/cordova_android/framework/assets/js/position.js +100 -0
- data/templates/cordova_android/framework/assets/js/storage.js +439 -0
- data/templates/cordova_android/framework/assets/www/index.html +27 -0
- data/templates/cordova_android/framework/build.xml +216 -0
- data/templates/cordova_android/framework/libs/commons-codec-1.3.jar +0 -0
- data/templates/cordova_android/framework/proguard-project.txt +20 -0
- data/templates/cordova_android/framework/project.properties +14 -0
- data/templates/cordova_android/framework/res/drawable/icon.png +0 -0
- data/templates/cordova_android/framework/res/drawable/splash.png +0 -0
- data/templates/cordova_android/framework/res/layout/main.xml +29 -0
- data/templates/cordova_android/framework/res/values/strings.xml +23 -0
- data/templates/cordova_android/framework/res/xml/cordova.xml +37 -0
- data/templates/cordova_android/framework/res/xml/plugins.xml +37 -0
- data/templates/cordova_android/framework/src/com/phonegap/api/IPlugin.java +27 -0
- data/templates/cordova_android/framework/src/com/phonegap/api/LOG.java +28 -0
- data/templates/cordova_android/framework/src/com/phonegap/api/PhonegapActivity.java +28 -0
- data/templates/cordova_android/framework/src/com/phonegap/api/Plugin.java +27 -0
- data/templates/cordova_android/framework/src/com/phonegap/api/PluginManager.java +35 -0
- data/templates/cordova_android/framework/src/com/phonegap/api/PluginResult.java +53 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/AccelListener.java +311 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/App.java +198 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/AudioHandler.java +364 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/AudioPlayer.java +450 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/AuthenticationToken.java +69 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/BatteryListener.java +156 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/CallbackServer.java +431 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/CameraLauncher.java +500 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/Capture.java +400 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/CompassListener.java +308 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/ContactAccessor.java +198 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/ContactAccessorSdk5.java +1934 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/ContactManager.java +113 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/CordovaChromeClient.java +314 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/CordovaWebViewClient.java +306 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/Device.java +219 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/DirectoryManager.java +161 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/DroidGap.java +1417 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/ExifHelper.java +165 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/FileTransfer.java +458 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/FileUploadResult.java +63 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/FileUtils.java +1048 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/GeoBroker.java +165 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/GeoListener.java +133 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/GpsListener.java +163 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/HttpHandler.java +80 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/LinearLayoutSoftKeyboardDetect.java +104 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/NetworkListener.java +153 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/NetworkManager.java +248 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/Notification.java +366 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/PreferenceNode.java +34 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/PreferenceSet.java +62 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/StandAlone.java +35 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/Storage.java +239 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/TempListener.java +112 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/api/CordovaInterface.java +145 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/api/IPlugin.java +116 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/api/LOG.java +234 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/api/Plugin.java +210 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/api/PluginManager.java +359 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/api/PluginResult.java +119 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/file/EncodingException.java +28 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/file/FileExistsException.java +28 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/file/InvalidModificationException.java +29 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/file/NoModificationAllowedException.java +28 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/file/TypeMismatchException.java +29 -0
- data/templates/cordova_android/framework/test/org/apache/cordova/PreferenceNodeTest.java +53 -0
- data/templates/cordova_android/framework/test/org/apache/cordova/PreferenceSetTest.java +73 -0
- metadata +279 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
.DS_Store
|
2
|
+
default.properties
|
3
|
+
gen
|
4
|
+
assets/www/cordova.js
|
5
|
+
local.properties
|
6
|
+
framework/proguard.cfg
|
7
|
+
framework/cordova.jar
|
8
|
+
framework/cordova-*.jar
|
9
|
+
framework/phonegap-*.jar
|
10
|
+
framework/bin
|
11
|
+
framework/test/org/apache/cordova/*.class
|
12
|
+
framework/assets/www/.DS_Store
|
13
|
+
framework/assets/www/cordova-*.js
|
14
|
+
framework/assets/www/phonegap-*.js
|
15
|
+
example
|
16
|
+
./test
|
17
|
+
tmp
|
18
|
+
*.tmp
|
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
@@ -0,0 +1,95 @@
|
|
1
|
+
Cordova Android
|
2
|
+
===
|
3
|
+
|
4
|
+
Cordova Android is an Android application library that allows for Cordova based projects to be built for the Android Platform. Cordova based applications are, at the core, an application written with web technology: HTML, CSS and JavaScript.
|
5
|
+
|
6
|
+
Apache Cordova is an effort undergoing incubation at The Apache
|
7
|
+
Software Foundation (ASF), sponsored by the Apache Incubator project.
|
8
|
+
Incubation is required of all newly accepted projects until a further
|
9
|
+
review indicates that the infrastructure, communications, and decision
|
10
|
+
making process have stabilized in a manner consistent with other
|
11
|
+
successful ASF projects. While incubation status is not necessarily
|
12
|
+
a reflection of the completeness or stability of the code, it does
|
13
|
+
indicate that the project has yet to be fully endorsed by the ASF.
|
14
|
+
|
15
|
+
Requires
|
16
|
+
---
|
17
|
+
|
18
|
+
- Java JDK 1.5
|
19
|
+
- Apache ANT
|
20
|
+
- Android SDK [http://developer.android.com](http://developer.android.com)
|
21
|
+
|
22
|
+
|
23
|
+
Building
|
24
|
+
---
|
25
|
+
|
26
|
+
To create your cordova.jar, run in the framework directory:
|
27
|
+
|
28
|
+
android update project -p . -t android-15
|
29
|
+
ant jar
|
30
|
+
|
31
|
+
|
32
|
+
Cordova Android Developer Tools
|
33
|
+
---
|
34
|
+
|
35
|
+
The Cordova developer tooling is split between general tooling and project level tooling.
|
36
|
+
|
37
|
+
General Commands
|
38
|
+
|
39
|
+
./bin/create [path package activity] ... create the ./example app or a cordova android project
|
40
|
+
./bin/bench ............................ generate a bench proj
|
41
|
+
./bin/autotest ......................... test the cli tools
|
42
|
+
./bin/test ............................. run mobile-spec
|
43
|
+
|
44
|
+
Project Commands
|
45
|
+
|
46
|
+
These commands live in a generated Cordova Android project.
|
47
|
+
|
48
|
+
./cordovap/debug [path] ..................... install to first device
|
49
|
+
./cordova/emulate .......................... start avd (emulator) named default
|
50
|
+
./cordova/log .............................. starts logcat
|
51
|
+
|
52
|
+
Running the Example Project
|
53
|
+
---
|
54
|
+
|
55
|
+
Start avd (emulator) named `default`:
|
56
|
+
|
57
|
+
./bin/emulate
|
58
|
+
|
59
|
+
Create the example project and build it to the first device:
|
60
|
+
|
61
|
+
./bin/create
|
62
|
+
cd example
|
63
|
+
./cordova/debug
|
64
|
+
|
65
|
+
Start adb logcat (console.log calls output here):
|
66
|
+
|
67
|
+
./cordova/log
|
68
|
+
|
69
|
+
Running the [callback/callback-test](http://github.com/callback/callback-test) tests:
|
70
|
+
---
|
71
|
+
|
72
|
+
./bin/test
|
73
|
+
|
74
|
+
Creating a new Cordova Android Project
|
75
|
+
---
|
76
|
+
|
77
|
+
./bin/create ~/Desktop/myapp com.phonegap.special MyApp
|
78
|
+
|
79
|
+
Importing a Cordova Android Project into Eclipse
|
80
|
+
----
|
81
|
+
|
82
|
+
1. File > New > Project...
|
83
|
+
2. Android > Android Project
|
84
|
+
3. Create project from existing source (point to the generated app found in tmp/android)
|
85
|
+
4. Right click on libs/cordova.jar and add to build path
|
86
|
+
5. Right click on the project root: Run as > Run Configurations
|
87
|
+
6. Click on the Target tab and select Manual (this way you can choose the emulator or device to build to)
|
88
|
+
|
89
|
+
|
90
|
+
Further Reading
|
91
|
+
---
|
92
|
+
|
93
|
+
- [http://developer.android.com](http://developer.android.com)
|
94
|
+
- [http://docs.phonegap.com](http://docs.phonegap.com)
|
95
|
+
- [http://wiki.phonegap.com](http://wiki.phonegap.com)
|
@@ -0,0 +1 @@
|
|
1
|
+
1.5.0
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#! /bin/sh
|
2
|
+
#
|
3
|
+
# Creates an app in `./bench` that posts results to http://cordova-bench.heroku.com with current cordova/Android sha.
|
4
|
+
#
|
5
|
+
# USAGE
|
6
|
+
# ./bin/bench
|
7
|
+
#
|
8
|
+
|
9
|
+
# clobber any existing bench
|
10
|
+
if [ -e ./bench ]
|
11
|
+
then
|
12
|
+
rm -rf ./bench
|
13
|
+
fi
|
14
|
+
|
15
|
+
# create a benching app
|
16
|
+
./bin/create ./bench org.apache.cordova.bench cordovaBench
|
17
|
+
|
18
|
+
# grab the latest bench www code
|
19
|
+
git clone git@github.com:brianleroux/cordova-bench.git
|
20
|
+
|
21
|
+
# copy it into the app
|
22
|
+
cat ./cordova-bench/www/index.html > ./bench/assets/www/index.html
|
23
|
+
#cat ~/Desktop/cordova-bench/www/index.html > ./bench/assets/www/index.html
|
24
|
+
|
25
|
+
# clean up
|
26
|
+
rm -rf ./cordova-bench
|
27
|
+
|
28
|
+
# launch to the first device found
|
29
|
+
./bin/debug ./bench
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#! /bin/sh
|
2
|
+
#
|
3
|
+
# create a cordova/android project
|
4
|
+
#
|
5
|
+
# USAGE
|
6
|
+
# ./create [path package activity]
|
7
|
+
#
|
8
|
+
set -e
|
9
|
+
|
10
|
+
PROJECT_PATH=${1:-"./example"}
|
11
|
+
PACKAGE=${2:-"org.apache.cordova.example"}
|
12
|
+
ACTIVITY=${3:-"cordovaExample"}
|
13
|
+
TARGET=$(android list targets | grep 'id: ' | sed 's/id: \([0-9]*\).*/\1/g' | tail -1)
|
14
|
+
VERSION=$(cat ./VERSION)
|
15
|
+
|
16
|
+
# clobber any existing example
|
17
|
+
if [ $# -eq 0 ]
|
18
|
+
then
|
19
|
+
rm -rf $PROJECT_PATH
|
20
|
+
fi
|
21
|
+
|
22
|
+
# update the cordova-android framework for the desired target
|
23
|
+
android update project --target $TARGET --path ./framework
|
24
|
+
|
25
|
+
# compile cordova.js and cordova.jar
|
26
|
+
cd ./framework && ant jar && cd ../
|
27
|
+
|
28
|
+
# copy all the bin scripts etc in there
|
29
|
+
cp -R ./bin/templates/project/ $PROJECT_PATH
|
30
|
+
|
31
|
+
# copy in cordova.js
|
32
|
+
cp ./framework/assets/www/cordova-$VERSION.js $PROJECT_PATH/.cordova/android/cordova-$VERSION.js
|
33
|
+
|
34
|
+
# copy in cordova.jar
|
35
|
+
cp ./framework/cordova-$VERSION.jar $PROJECT_PATH/.cordova/android/cordova-$VERSION.jar
|
36
|
+
|
37
|
+
# app properties
|
38
|
+
cat > $PROJECT_PATH/.cordova/config <<eom
|
39
|
+
VERSION=$VERSION
|
40
|
+
PROJECT_PATH=$PROJECT_PATH
|
41
|
+
PACKAGE=$PACKAGE
|
42
|
+
ACTIVITY=$ACTIVITY
|
43
|
+
TARGET=$TARGET
|
44
|
+
eom
|
45
|
+
|
46
|
+
(cd $PROJECT_PATH && ./cordova/create)
|
@@ -0,0 +1 @@
|
|
1
|
+
cscript create.js
|
@@ -0,0 +1,88 @@
|
|
1
|
+
/*
|
2
|
+
* create a cordova/android project
|
3
|
+
*
|
4
|
+
* USAGE
|
5
|
+
* ./create [path package activity]
|
6
|
+
*/
|
7
|
+
|
8
|
+
function read(filename) {
|
9
|
+
var fso=WScript.CreateObject("Scripting.FileSystemObject");
|
10
|
+
var f=fso.OpenTextFile(filename, 1, true);
|
11
|
+
var s=f.ReadAll();
|
12
|
+
f.Close();
|
13
|
+
return s;
|
14
|
+
}
|
15
|
+
function write(filename, contents) {
|
16
|
+
var fso=WScript.CreateObject("Scripting.FileSystemObject");
|
17
|
+
var f=fso.OpenTextFile(filename, 2, true);
|
18
|
+
f.Write(contents);
|
19
|
+
f.Close();
|
20
|
+
}
|
21
|
+
function replaceInFile(filename, regexp, replacement) {
|
22
|
+
write(filename, read(filename).replace(regexp, replacement));
|
23
|
+
}
|
24
|
+
function exec(s) {
|
25
|
+
var o=shell.Exec(s);
|
26
|
+
}
|
27
|
+
|
28
|
+
var args = WScript.Arguments, PROJECT_PATH="example",
|
29
|
+
PACKAGE="org.apache.cordova.example", ACTIVITY="cordovaExample",
|
30
|
+
shell=WScript.CreateObject("WScript.Shell");
|
31
|
+
|
32
|
+
if (args.Count() == 3) {
|
33
|
+
WScript.Echo('Found expected arguments');
|
34
|
+
PROJECT_PATH=args(0);
|
35
|
+
PACKAGE=args(1);
|
36
|
+
ACTIVITY=args(2);
|
37
|
+
}
|
38
|
+
|
39
|
+
var PACKAGE_AS_PATH=PACKAGE.replace(/\./g, '\\');
|
40
|
+
var ACTIVITY_PATH=PROJECT_PATH+'\\src\\'+PACKAGE_AS_PATH+'\\'+ACTIVITY+'.java';
|
41
|
+
var MANIFEST_PATH=PROJECT_PATH+'\\AndroidManifest.xml';
|
42
|
+
var TARGET=shell.Exec('android.bat list targets').StdOut.ReadAll().match(/id:\s([0-9]).*/)[1];
|
43
|
+
var VERSION=read('VERSION').replace(/\r\n/,'').replace(/\n/,'');
|
44
|
+
|
45
|
+
// clobber any existing example
|
46
|
+
|
47
|
+
/*
|
48
|
+
if [ $# -eq 0 ]
|
49
|
+
then
|
50
|
+
rm -rf $PROJECT_PATH
|
51
|
+
fi
|
52
|
+
*/
|
53
|
+
|
54
|
+
// create the project
|
55
|
+
exec('android.bat create project --target '+TARGET+' --path '+PROJECT_PATH+' --package '+PACKAGE+' --activity '+ACTIVITY);
|
56
|
+
|
57
|
+
// update the cordova framework project to a target that exists on this machine
|
58
|
+
exec('android.bat update project --target '+TARGET+' --path framework');
|
59
|
+
|
60
|
+
// compile cordova.js and cordova.jar
|
61
|
+
// if you see an error about "Unable to resolve target" then you may need to
|
62
|
+
// update your android tools or install an additional Android platform version
|
63
|
+
exec('ant.bat -f framework\\build.xml jar');
|
64
|
+
|
65
|
+
// copy in the project template
|
66
|
+
exec('cmd /c xcopy bin\\templates\\project '+PROJECT_PATH+' /S /Y');
|
67
|
+
|
68
|
+
// copy in cordova.js
|
69
|
+
exec('cmd /c copy framework\\assets\\www\\cordova-'+VERSION+'.js '+PROJECT_PATH+'\\assets\\www\\cordova-'+VERSION+'.js /Y');
|
70
|
+
|
71
|
+
// copy in cordova.jar
|
72
|
+
exec('cmd /c copy framework\\cordova-'+VERSION+'.jar '+PROJECT_PATH+'\\libs\\cordova-'+VERSION+'.jar /Y');
|
73
|
+
|
74
|
+
// copy in default activity
|
75
|
+
exec('cmd /c copy bin\\templates\\Activity.java '+ACTIVITY_PATH+' /Y');
|
76
|
+
|
77
|
+
// interpolate the activity name and package
|
78
|
+
replaceInFile(ACTIVITY_PATH, /__ACTIVITY__/, ACTIVITY);
|
79
|
+
replaceInFile(ACTIVITY_PATH, /__ID__/, PACKAGE);
|
80
|
+
|
81
|
+
replaceInFile(MANIFEST_PATH, /__ACTIVITY__/, ACTIVITY);
|
82
|
+
replaceInFile(MANIFEST_PATH, /__PACKAGE__/, PACKAGE);
|
83
|
+
|
84
|
+
/*
|
85
|
+
# leave the id for launching
|
86
|
+
touch $PROJECT_PATH/package-activity
|
87
|
+
echo $PACKAGE/$PACKAGE.$ACTIVITY > $PROJECT_PATH/package-activity
|
88
|
+
*/
|
@@ -0,0 +1,79 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project name="cordova" default="create" basedir="../">
|
3
|
+
|
4
|
+
<property name="project.path" value="${basedir}/example"/>
|
5
|
+
<property name="package" value="org.apache.cordova.example"/>
|
6
|
+
<property name="activity" value="cordovaExample"/>
|
7
|
+
|
8
|
+
<target name="create">
|
9
|
+
|
10
|
+
<!-- this stuff is seriously stupid -->
|
11
|
+
<echo file="tmp/package.tmp">package-as-path=${package}</echo>
|
12
|
+
<replace file="tmp/package.tmp" token="." value="\\" />
|
13
|
+
<property file="tmp/package.tmp" />
|
14
|
+
|
15
|
+
<property name="activity.path" value="${project.path}/src/${package-as-path}/${activity}.java" />
|
16
|
+
<property name="manifest.path" value="${project.path}/AndroidManifest.xml" />
|
17
|
+
|
18
|
+
<!-- get the highest target on this machine -->
|
19
|
+
<!-- this stuff is also seriously stupid -->
|
20
|
+
<exec executable="cmd" osfamily="windows" output="tmp/target.list.tmp">
|
21
|
+
<arg line="/c android.bat list targets"/>
|
22
|
+
</exec>
|
23
|
+
<exec executable="android" osfamily="mac" output="tmp/target.list.tmp">
|
24
|
+
<arg line="list targets"/>
|
25
|
+
</exec>
|
26
|
+
<replaceregexp file="tmp/target.list.tmp" match=".*id:\s([0-9]).*" replace="target=\1" flags="s" />
|
27
|
+
<property file="tmp/target.list.tmp" />
|
28
|
+
|
29
|
+
<!-- var VERSION=read('VERSION').replace(/\r\n/,'').replace(/\n/,''); -->
|
30
|
+
<copy file="VERSION" tofile="tmp/VERSION.tmp" overwrite="true" />
|
31
|
+
<replaceregexp file="tmp/VERSION.tmp" match="^" replace="version=" />
|
32
|
+
<replaceregexp file="tmp/VERSION.tmp" match="\r\n" replace="" />
|
33
|
+
<property file="tmp/VERSION.tmp" />
|
34
|
+
|
35
|
+
<!-- clobber any existing example -->
|
36
|
+
|
37
|
+
<!-- create the project -->
|
38
|
+
<exec executable="cmd" osfamily="windows">
|
39
|
+
<arg line="/c android.bat create project --target ${target} --path ${project.path} --package ${package} --activity ${activity}"/>
|
40
|
+
</exec>
|
41
|
+
<exec executable="android" osfamily="mac">
|
42
|
+
<arg line="create project --target ${target} --path ${project.path} --package ${package} --activity ${activity}"/>
|
43
|
+
</exec>
|
44
|
+
|
45
|
+
<!-- update the framework dir -->
|
46
|
+
<exec executable="cmd" osfamily="windows">
|
47
|
+
<arg line="/c android.bat update project --target ${target} --path ${basedir}/framework"/>
|
48
|
+
</exec>
|
49
|
+
<exec executable="android" osfamily="mac">
|
50
|
+
<arg line="update project --target ${target} --path ${basedir}/framework"/>
|
51
|
+
</exec>
|
52
|
+
|
53
|
+
<!-- compile cordova.js and cordova.jar -->
|
54
|
+
<!-- // if you see an error about "Unable to resolve target" then you may need to
|
55
|
+
// update your android tools or install an additional Android platform version -->
|
56
|
+
<ant antfile="${basedir}/framework/build.xml" useNativeBasedir="true" inheritAll="false" />
|
57
|
+
|
58
|
+
<!-- copy in the project template -->
|
59
|
+
<copy todir="${project.path}" overwrite="true">
|
60
|
+
<fileset dir="${basedir}/bin/templates/project"/>
|
61
|
+
</copy>
|
62
|
+
|
63
|
+
<!-- copy in cordova.js -->
|
64
|
+
<copy file="${basedir}/framework/assets/www/cordova-${version}.js" todir="${project.path}/assets/www/" />
|
65
|
+
|
66
|
+
<!-- copy in cordova.jar -->
|
67
|
+
<copy file="${basedir}/framework/cordova-${version}.jar" todir="${project.path}/libs/" />
|
68
|
+
|
69
|
+
<!-- copy in default activity -->
|
70
|
+
<copy file="${basedir}/bin/templates/Activity.java" tofile="${activity.path}" overwrite="true" />
|
71
|
+
|
72
|
+
<!-- interpolate the activity name and package -->
|
73
|
+
<replaceregexp file="${activity.path}" match="__ACTIVITY__" replace="${activity}" />
|
74
|
+
<replaceregexp file="${activity.path}" match="__ID__" replace="${package}" />
|
75
|
+
|
76
|
+
<replaceregexp file="${manifest.path}" match="__ACTIVITY__" replace="${activity}" />
|
77
|
+
<replaceregexp file="${manifest.path}" match="__PACKAGE__" replace="${package}" />
|
78
|
+
</target>
|
79
|
+
</project>
|