mobile_template 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE +22 -0
  4. data/README.md +28 -0
  5. data/Rakefile +3 -0
  6. data/bin/mobile_template +71 -0
  7. data/lib/mobile_template/version.rb +4 -0
  8. data/lib/mobile_template.rb +5 -0
  9. data/mobile_template.gemspec +21 -0
  10. data/templates/assets/Gemfile +4 -0
  11. data/templates/assets/config.rb +96 -0
  12. data/templates/assets/config.ru +4 -0
  13. data/templates/assets/source/images/vendor/ajax-loader.gif +0 -0
  14. data/templates/assets/source/images/vendor/ajax-loader.png +0 -0
  15. data/templates/assets/source/images/vendor/icons-18-black.png +0 -0
  16. data/templates/assets/source/images/vendor/icons-18-white.png +0 -0
  17. data/templates/assets/source/images/vendor/icons-36-black.png +0 -0
  18. data/templates/assets/source/images/vendor/icons-36-white.png +0 -0
  19. data/templates/assets/source/index.html.erb +2 -0
  20. data/templates/assets/source/javascripts/app/index.js.coffee +2 -0
  21. data/templates/assets/source/javascripts/application.js.coffee +5 -0
  22. data/templates/assets/source/javascripts/vendor/cordova.js +4841 -0
  23. data/templates/assets/source/javascripts/vendor/jquery.js +9267 -0
  24. data/templates/assets/source/javascripts/vendor/jquery.mobile.js +7410 -0
  25. data/templates/assets/source/layout.erb +24 -0
  26. data/templates/assets/source/stylesheets/application.css.scss +2 -0
  27. data/templates/assets/source/stylesheets/vendor/jquery.mobile.css.scss +1872 -0
  28. data/templates/cordova_android/.gitignore +18 -0
  29. data/templates/cordova_android/LICENSE +202 -0
  30. data/templates/cordova_android/NOTICE +5 -0
  31. data/templates/cordova_android/README.md +95 -0
  32. data/templates/cordova_android/VERSION +1 -0
  33. data/templates/cordova_android/bin/BOOM +4 -0
  34. data/templates/cordova_android/bin/autotest +2 -0
  35. data/templates/cordova_android/bin/bench +29 -0
  36. data/templates/cordova_android/bin/create +46 -0
  37. data/templates/cordova_android/bin/create.bat +1 -0
  38. data/templates/cordova_android/bin/create.js +88 -0
  39. data/templates/cordova_android/bin/create.xml +79 -0
  40. data/templates/cordova_android/bin/node_modules/.bin/cake +7 -0
  41. data/templates/cordova_android/bin/node_modules/.bin/coffee +7 -0
  42. data/templates/cordova_android/bin/node_modules/.bin/nodeunit +120 -0
  43. data/templates/cordova_android/bin/node_modules/coffee-script/.npmignore +11 -0
  44. data/templates/cordova_android/bin/node_modules/coffee-script/LICENSE +22 -0
  45. data/templates/cordova_android/bin/node_modules/coffee-script/README +48 -0
  46. data/templates/cordova_android/bin/node_modules/coffee-script/Rakefile +78 -0
  47. data/templates/cordova_android/bin/node_modules/coffee-script/bin/cake +7 -0
  48. data/templates/cordova_android/bin/node_modules/coffee-script/bin/coffee +7 -0
  49. data/templates/cordova_android/bin/node_modules/coffee-script/extras/jsl.conf +44 -0
  50. data/templates/cordova_android/bin/node_modules/coffee-script/lib/browser.js +75 -0
  51. data/templates/cordova_android/bin/node_modules/coffee-script/lib/cake.js +76 -0
  52. data/templates/cordova_android/bin/node_modules/coffee-script/lib/coffee-script.js +135 -0
  53. data/templates/cordova_android/bin/node_modules/coffee-script/lib/command.js +301 -0
  54. data/templates/cordova_android/bin/node_modules/coffee-script/lib/grammar.js +591 -0
  55. data/templates/cordova_android/bin/node_modules/coffee-script/lib/helpers.js +66 -0
  56. data/templates/cordova_android/bin/node_modules/coffee-script/lib/index.js +8 -0
  57. data/templates/cordova_android/bin/node_modules/coffee-script/lib/lexer.js +656 -0
  58. data/templates/cordova_android/bin/node_modules/coffee-script/lib/nodes.js +2289 -0
  59. data/templates/cordova_android/bin/node_modules/coffee-script/lib/optparse.js +111 -0
  60. data/templates/cordova_android/bin/node_modules/coffee-script/lib/parser.js +676 -0
  61. data/templates/cordova_android/bin/node_modules/coffee-script/lib/repl.js +123 -0
  62. data/templates/cordova_android/bin/node_modules/coffee-script/lib/rewriter.js +363 -0
  63. data/templates/cordova_android/bin/node_modules/coffee-script/lib/scope.js +120 -0
  64. data/templates/cordova_android/bin/node_modules/coffee-script/package.json +27 -0
  65. data/templates/cordova_android/bin/node_modules/nodeunit/.gitignore +5 -0
  66. data/templates/cordova_android/bin/node_modules/nodeunit/.npmignore +3 -0
  67. data/templates/cordova_android/bin/node_modules/nodeunit/CONTRIBUTORS.md +60 -0
  68. data/templates/cordova_android/bin/node_modules/nodeunit/LICENSE +19 -0
  69. data/templates/cordova_android/bin/node_modules/nodeunit/Makefile +126 -0
  70. data/templates/cordova_android/bin/node_modules/nodeunit/README.md +432 -0
  71. data/templates/cordova_android/bin/node_modules/nodeunit/bin/nodeunit +120 -0
  72. data/templates/cordova_android/bin/node_modules/nodeunit/bin/nodeunit.json +10 -0
  73. data/templates/cordova_android/bin/node_modules/nodeunit/deps/async.js +623 -0
  74. data/templates/cordova_android/bin/node_modules/nodeunit/deps/console.log.js +55 -0
  75. data/templates/cordova_android/bin/node_modules/nodeunit/deps/ejs.js +125 -0
  76. data/templates/cordova_android/bin/node_modules/nodeunit/deps/json2.js +483 -0
  77. data/templates/cordova_android/bin/node_modules/nodeunit/examples/browser/nodeunit.js +1757 -0
  78. data/templates/cordova_android/bin/node_modules/nodeunit/examples/browser/suite1.js +12 -0
  79. data/templates/cordova_android/bin/node_modules/nodeunit/examples/browser/suite2.js +13 -0
  80. data/templates/cordova_android/bin/node_modules/nodeunit/examples/browser/test.html +16 -0
  81. data/templates/cordova_android/bin/node_modules/nodeunit/img/example_fail.png +0 -0
  82. data/templates/cordova_android/bin/node_modules/nodeunit/img/example_pass.png +0 -0
  83. data/templates/cordova_android/bin/node_modules/nodeunit/index.js +3 -0
  84. data/templates/cordova_android/bin/node_modules/nodeunit/lib/assert.js +316 -0
  85. data/templates/cordova_android/bin/node_modules/nodeunit/lib/core.js +260 -0
  86. data/templates/cordova_android/bin/node_modules/nodeunit/lib/nodeunit.js +82 -0
  87. data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/browser.js +119 -0
  88. data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/default.js +123 -0
  89. data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/html.js +107 -0
  90. data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/index.js +9 -0
  91. data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/junit.js +183 -0
  92. data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/minimal.js +112 -0
  93. data/templates/cordova_android/bin/node_modules/nodeunit/lib/reporters/skip_passed.js +105 -0
  94. data/templates/cordova_android/bin/node_modules/nodeunit/lib/track.js +48 -0
  95. data/templates/cordova_android/bin/node_modules/nodeunit/lib/types.js +187 -0
  96. data/templates/cordova_android/bin/node_modules/nodeunit/lib/utils.js +209 -0
  97. data/templates/cordova_android/bin/node_modules/nodeunit/man1/nodeunit.1 +95 -0
  98. data/templates/cordova_android/bin/node_modules/nodeunit/nodelint.cfg +4 -0
  99. data/templates/cordova_android/bin/node_modules/nodeunit/package.json +56 -0
  100. data/templates/cordova_android/bin/node_modules/nodeunit/share/junit.xml.ejs +19 -0
  101. data/templates/cordova_android/bin/node_modules/nodeunit/share/license.js +11 -0
  102. data/templates/cordova_android/bin/node_modules/nodeunit/share/nodeunit.css +70 -0
  103. data/templates/cordova_android/bin/templates/project/.cordova/android/readme.md +1 -0
  104. data/templates/cordova_android/bin/templates/project/.cordova/readme.md +3 -0
  105. data/templates/cordova_android/bin/templates/project/cordova/create +36 -0
  106. data/templates/cordova_android/bin/templates/project/cordova/debug +9 -0
  107. data/templates/cordova_android/bin/templates/project/cordova/emulate +12 -0
  108. data/templates/cordova_android/bin/templates/project/cordova/log +3 -0
  109. data/templates/cordova_android/bin/templates/project/cordova/templates/Activity.java +16 -0
  110. data/templates/cordova_android/bin/templates/project/cordova/templates/project/AndroidManifest.xml +50 -0
  111. data/templates/cordova_android/bin/templates/project/cordova/templates/project/assets/www/index.html +42 -0
  112. data/templates/cordova_android/bin/templates/project/cordova/templates/project/assets/www/main.js +146 -0
  113. data/templates/cordova_android/bin/templates/project/cordova/templates/project/assets/www/master.css +96 -0
  114. data/templates/cordova_android/bin/templates/project/cordova/templates/project/res/drawable/icon.png +0 -0
  115. data/templates/cordova_android/bin/templates/project/cordova/templates/project/res/xml/cordova.xml +5 -0
  116. data/templates/cordova_android/bin/templates/project/cordova/templates/project/res/xml/plugins.xml +19 -0
  117. data/templates/cordova_android/bin/test +26 -0
  118. data/templates/cordova_android/bin/tests/autotest.coffee +4 -0
  119. data/templates/cordova_android/bin/tests/create.coffee +21 -0
  120. data/templates/cordova_android/bin/tests/debug.coffee +0 -0
  121. data/templates/cordova_android/bin/tests/test.coffee +0 -0
  122. data/templates/cordova_android/framework/.classpath +8 -0
  123. data/templates/cordova_android/framework/.project +33 -0
  124. data/templates/cordova_android/framework/AndroidManifest.xml +68 -0
  125. data/templates/cordova_android/framework/ant.properties +34 -0
  126. data/templates/cordova_android/framework/assets/js/accelerometer.js +137 -0
  127. data/templates/cordova_android/framework/assets/js/app.js +89 -0
  128. data/templates/cordova_android/framework/assets/js/battery.js +134 -0
  129. data/templates/cordova_android/framework/assets/js/camera.js +168 -0
  130. data/templates/cordova_android/framework/assets/js/capture.js +203 -0
  131. data/templates/cordova_android/framework/assets/js/compass.js +168 -0
  132. data/templates/cordova_android/framework/assets/js/contact.js +310 -0
  133. data/templates/cordova_android/framework/assets/js/cordova.android.js +4841 -0
  134. data/templates/cordova_android/framework/assets/js/cordova.js.base +924 -0
  135. data/templates/cordova_android/framework/assets/js/crypto.js +54 -0
  136. data/templates/cordova_android/framework/assets/js/device.js +83 -0
  137. data/templates/cordova_android/framework/assets/js/file.js +1082 -0
  138. data/templates/cordova_android/framework/assets/js/filetransfer.js +125 -0
  139. data/templates/cordova_android/framework/assets/js/geolocation.js +209 -0
  140. data/templates/cordova_android/framework/assets/js/header.txt +19 -0
  141. data/templates/cordova_android/framework/assets/js/media.js +233 -0
  142. data/templates/cordova_android/framework/assets/js/network.js +100 -0
  143. data/templates/cordova_android/framework/assets/js/notification.js +133 -0
  144. data/templates/cordova_android/framework/assets/js/position.js +100 -0
  145. data/templates/cordova_android/framework/assets/js/storage.js +439 -0
  146. data/templates/cordova_android/framework/assets/www/index.html +27 -0
  147. data/templates/cordova_android/framework/build.xml +216 -0
  148. data/templates/cordova_android/framework/libs/commons-codec-1.3.jar +0 -0
  149. data/templates/cordova_android/framework/proguard-project.txt +20 -0
  150. data/templates/cordova_android/framework/project.properties +14 -0
  151. data/templates/cordova_android/framework/res/drawable/icon.png +0 -0
  152. data/templates/cordova_android/framework/res/drawable/splash.png +0 -0
  153. data/templates/cordova_android/framework/res/layout/main.xml +29 -0
  154. data/templates/cordova_android/framework/res/values/strings.xml +23 -0
  155. data/templates/cordova_android/framework/res/xml/cordova.xml +37 -0
  156. data/templates/cordova_android/framework/res/xml/plugins.xml +37 -0
  157. data/templates/cordova_android/framework/src/com/phonegap/api/IPlugin.java +27 -0
  158. data/templates/cordova_android/framework/src/com/phonegap/api/LOG.java +28 -0
  159. data/templates/cordova_android/framework/src/com/phonegap/api/PhonegapActivity.java +28 -0
  160. data/templates/cordova_android/framework/src/com/phonegap/api/Plugin.java +27 -0
  161. data/templates/cordova_android/framework/src/com/phonegap/api/PluginManager.java +35 -0
  162. data/templates/cordova_android/framework/src/com/phonegap/api/PluginResult.java +53 -0
  163. data/templates/cordova_android/framework/src/org/apache/cordova/AccelListener.java +311 -0
  164. data/templates/cordova_android/framework/src/org/apache/cordova/App.java +198 -0
  165. data/templates/cordova_android/framework/src/org/apache/cordova/AudioHandler.java +364 -0
  166. data/templates/cordova_android/framework/src/org/apache/cordova/AudioPlayer.java +450 -0
  167. data/templates/cordova_android/framework/src/org/apache/cordova/AuthenticationToken.java +69 -0
  168. data/templates/cordova_android/framework/src/org/apache/cordova/BatteryListener.java +156 -0
  169. data/templates/cordova_android/framework/src/org/apache/cordova/CallbackServer.java +431 -0
  170. data/templates/cordova_android/framework/src/org/apache/cordova/CameraLauncher.java +500 -0
  171. data/templates/cordova_android/framework/src/org/apache/cordova/Capture.java +400 -0
  172. data/templates/cordova_android/framework/src/org/apache/cordova/CompassListener.java +308 -0
  173. data/templates/cordova_android/framework/src/org/apache/cordova/ContactAccessor.java +198 -0
  174. data/templates/cordova_android/framework/src/org/apache/cordova/ContactAccessorSdk5.java +1934 -0
  175. data/templates/cordova_android/framework/src/org/apache/cordova/ContactManager.java +113 -0
  176. data/templates/cordova_android/framework/src/org/apache/cordova/CordovaChromeClient.java +314 -0
  177. data/templates/cordova_android/framework/src/org/apache/cordova/CordovaWebViewClient.java +306 -0
  178. data/templates/cordova_android/framework/src/org/apache/cordova/Device.java +219 -0
  179. data/templates/cordova_android/framework/src/org/apache/cordova/DirectoryManager.java +161 -0
  180. data/templates/cordova_android/framework/src/org/apache/cordova/DroidGap.java +1417 -0
  181. data/templates/cordova_android/framework/src/org/apache/cordova/ExifHelper.java +165 -0
  182. data/templates/cordova_android/framework/src/org/apache/cordova/FileTransfer.java +458 -0
  183. data/templates/cordova_android/framework/src/org/apache/cordova/FileUploadResult.java +63 -0
  184. data/templates/cordova_android/framework/src/org/apache/cordova/FileUtils.java +1048 -0
  185. data/templates/cordova_android/framework/src/org/apache/cordova/GeoBroker.java +165 -0
  186. data/templates/cordova_android/framework/src/org/apache/cordova/GeoListener.java +133 -0
  187. data/templates/cordova_android/framework/src/org/apache/cordova/GpsListener.java +163 -0
  188. data/templates/cordova_android/framework/src/org/apache/cordova/HttpHandler.java +80 -0
  189. data/templates/cordova_android/framework/src/org/apache/cordova/LinearLayoutSoftKeyboardDetect.java +104 -0
  190. data/templates/cordova_android/framework/src/org/apache/cordova/NetworkListener.java +153 -0
  191. data/templates/cordova_android/framework/src/org/apache/cordova/NetworkManager.java +248 -0
  192. data/templates/cordova_android/framework/src/org/apache/cordova/Notification.java +366 -0
  193. data/templates/cordova_android/framework/src/org/apache/cordova/PreferenceNode.java +34 -0
  194. data/templates/cordova_android/framework/src/org/apache/cordova/PreferenceSet.java +62 -0
  195. data/templates/cordova_android/framework/src/org/apache/cordova/StandAlone.java +35 -0
  196. data/templates/cordova_android/framework/src/org/apache/cordova/Storage.java +239 -0
  197. data/templates/cordova_android/framework/src/org/apache/cordova/TempListener.java +112 -0
  198. data/templates/cordova_android/framework/src/org/apache/cordova/api/CordovaInterface.java +145 -0
  199. data/templates/cordova_android/framework/src/org/apache/cordova/api/IPlugin.java +116 -0
  200. data/templates/cordova_android/framework/src/org/apache/cordova/api/LOG.java +234 -0
  201. data/templates/cordova_android/framework/src/org/apache/cordova/api/Plugin.java +210 -0
  202. data/templates/cordova_android/framework/src/org/apache/cordova/api/PluginManager.java +359 -0
  203. data/templates/cordova_android/framework/src/org/apache/cordova/api/PluginResult.java +119 -0
  204. data/templates/cordova_android/framework/src/org/apache/cordova/file/EncodingException.java +28 -0
  205. data/templates/cordova_android/framework/src/org/apache/cordova/file/FileExistsException.java +28 -0
  206. data/templates/cordova_android/framework/src/org/apache/cordova/file/InvalidModificationException.java +29 -0
  207. data/templates/cordova_android/framework/src/org/apache/cordova/file/NoModificationAllowedException.java +28 -0
  208. data/templates/cordova_android/framework/src/org/apache/cordova/file/TypeMismatchException.java +29 -0
  209. data/templates/cordova_android/framework/test/org/apache/cordova/PreferenceNodeTest.java +53 -0
  210. data/templates/cordova_android/framework/test/org/apache/cordova/PreferenceSetTest.java +73 -0
  211. metadata +279 -0
@@ -0,0 +1,216 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Licensed to the Apache Software Foundation (ASF) under one
4
+ or more contributor license agreements. See the NOTICE file
5
+ distributed with this work for additional information
6
+ regarding copyright ownership. The ASF licenses this file
7
+ to you under the Apache License, Version 2.0 (the
8
+ "License"); you may not use this file except in compliance
9
+ with the License. You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing,
14
+ software distributed under the License is distributed on an
15
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ KIND, either express or implied. See the License for the
17
+ specific language governing permissions and limitations
18
+ under the License.
19
+ -->
20
+ <project name="Cordova" default="jar">
21
+
22
+ <!-- LOAD VERSION -->
23
+ <loadfile property="version" srcFile="../VERSION">
24
+ <filterchain>
25
+ <striplinebreaks/>
26
+ </filterchain>
27
+ </loadfile>
28
+
29
+ <!-- The local.properties file is created and updated by the 'android' tool.
30
+ It contains the path to the SDK. It should *NOT* be checked into
31
+ Version Control Systems. -->
32
+ <loadproperties srcFile="local.properties" />
33
+
34
+ <!-- The ant.properties file can be created by you. It is only edited by the
35
+ 'android' tool to add properties to it.
36
+ This is the place to change some Ant specific build properties.
37
+ Here are some properties you may want to change/update:
38
+
39
+ source.dir
40
+ The name of the source directory. Default is 'src'.
41
+ out.dir
42
+ The name of the output directory. Default is 'bin'.
43
+
44
+ For other overridable properties, look at the beginning of the rules
45
+ files in the SDK, at tools/ant/build.xml
46
+
47
+ Properties related to the SDK location or the project target should
48
+ be updated using the 'android' tool with the 'update' action.
49
+ This file is an integral part of the build system for your
50
+ application and should be checked into Version Control Systems.
51
+
52
+ -->
53
+ <property file="ant.properties" />
54
+
55
+ <!-- We need to setup the double quote. -->
56
+ <property name="dblQuote">"</property>
57
+
58
+ <!-- The project.properties file is created and updated by the 'android'
59
+ tool, as well as ADT.
60
+
61
+ This contains project specific properties such as project target, and library
62
+ dependencies. Lower level build properties are stored in ant.properties
63
+ (or in .classpath for Eclipse projects).
64
+
65
+ This file is an integral part of the build system for your
66
+ application and should be checked into Version Control Systems. -->
67
+ <loadproperties srcFile="project.properties" />
68
+
69
+ <!-- quick check on sdk.dir -->
70
+ <fail
71
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
72
+ unless="sdk.dir"
73
+ />
74
+
75
+ <!-- version-tag: custom -->
76
+ <!-- extension targets. Uncomment the ones where you want to do custom work
77
+ in between standard targets -->
78
+ <!--
79
+ <target name="-pre-build">
80
+ </target>
81
+ <target name="-pre-compile">
82
+ </target>
83
+
84
+ /* This is typically used for code obfuscation.
85
+ Compiled code location: ${out.classes.absolute.dir}
86
+ If this is not done in place, override ${out.dex.input.absolute.dir} */
87
+ <target name="-post-compile">
88
+ </target>
89
+ -->
90
+
91
+ <!-- Import the actual build file.
92
+
93
+ To customize existing targets, there are two options:
94
+ - Customize only one target:
95
+ - copy/paste the target into this file, *before* the
96
+ <import> task.
97
+ - customize it to your needs.
98
+ - Customize the whole content of build.xml
99
+ - copy/paste the content of the rules files (minus the top node)
100
+ into this file, replacing the <import> task.
101
+ - customize to your needs.
102
+
103
+ ***********************
104
+ ****** IMPORTANT ******
105
+ ***********************
106
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
107
+ in order to avoid having your file be overridden by tools such as "android update project"
108
+ -->
109
+ <import file="${sdk.dir}/tools/ant/build.xml" />
110
+
111
+
112
+ <target name="check-javascript" depends="build-javascript">
113
+ <!--
114
+ <delete dir="assets/lib"/>
115
+ <mkdir dir="assets/lib"/>
116
+ <echo file="assets/lib/lint.js">var alert=function(){},device={},Element={},debug={};</echo>
117
+ <concat destfile="assets/lib/cordova-lint.js" append="true">
118
+ <fileset dir="assets/lib">
119
+ <include name="lint.js" />
120
+ </fileset>
121
+ <fileset dir="assets/www">
122
+ <include name="cordova-${version}.js" />
123
+ </fileset>
124
+ </concat>
125
+
126
+ <exec executable="cmd" os="Windows 7">
127
+ <arg value="/c"/>
128
+ <arg value="java"/>
129
+ <arg value="-cp"/>
130
+ <arg value="${basedir}/util/js.jar"/>
131
+ <arg value="org.mozilla.javascript.tools.shell.Main"/>
132
+ <arg value="${basedir}/util/jslint.js"/>
133
+ <arg value="${basedir}/js/lib/cordova-lint.js"/>
134
+ </exec>
135
+ <exec executable="java" os="Mac OS X">
136
+ <arg value="-cp"/>
137
+ <arg value="../util/js.jar"/>
138
+ <arg value="org.mozilla.javascript.tools.shell.Main"/>
139
+ <arg value="../util/jslint.js"/>
140
+ <arg value="assets/lib/cordova-lint.js"/>
141
+ </exec>
142
+ -->
143
+ </target>
144
+
145
+ <!-- Combine JavaScript files into one cordova-uncompressed.js file. -->
146
+ <target name="build-javascript" depends="clean">
147
+
148
+ <!-- Clean up existing files -->
149
+ <!--<delete file="assets/www/cordova_${version}.js"/>-->
150
+
151
+ <!-- Create uncompressed JS file -->
152
+ <concat destfile="assets/www/cordova-${version}.js">
153
+ <filelist dir="assets/js" files="cordova.android.js"/>
154
+ <!--
155
+ <filelist dir="assets/js" files="cordova.js.base,device.js"/>
156
+ <fileset dir="assets/js" includes="*.js" excludes="cordova.js.base,device.js"/>
157
+ -->
158
+ </concat>
159
+
160
+ <!-- update project files to reference cordova-x.x.x.min.js -->
161
+ <replaceregexp match="cordova(.*)\.js" replace="cordova-${version}.js" byline="true">
162
+ <fileset file="assets/www/index.html" />
163
+ <!-- <fileset file="../bin/templates/project/assets/www/index.html" /> -->
164
+ </replaceregexp>
165
+ <!-- This is sketchy, but it works, ${dblQuote} does not -->
166
+ <replaceregexp match="cordovaVersion = [\u0022].*[\u0022];" replace='cordovaVersion = ${dblQuote}${version}${dblQuote};' byline="true">
167
+ <fileset file="src/org/apache/cordova/Device.java" />
168
+ </replaceregexp>
169
+
170
+ <!-- Delete temp file -->
171
+ <!--<delete file="assets/www/cordova-tmp.js"/>-->
172
+ </target>
173
+
174
+ <!-- Build Cordova jar file that includes all native code, and Cordova JS file
175
+ that includes all JavaScript code.
176
+ -->
177
+ <target name="jar" depends="build-javascript, -compile">
178
+ <jar jarfile="cordova-${version}.jar" basedir="bin/classes" excludes="org/apache/cordova/R.class,org/apache/cordova/R$*.class"/>
179
+ </target>
180
+
181
+ <!-- tests for Java files -->
182
+ <property name="test.dir" location="test/org/apache/cordova" />
183
+
184
+ <path id="test.classpath">
185
+ <!-- requires both junit and cordova -->
186
+ <pathelement location="libs/junit-4.10.jar" />
187
+ <pathelement location="cordova-${version}.jar" />
188
+ <pathelement location="${test.dir}" />
189
+ </path>
190
+
191
+ <target name="compile-test">
192
+ <javac srcdir="${test.dir}" >
193
+ <classpath refid="test.classpath" />
194
+ </javac>
195
+ </target>
196
+
197
+ <target name="test" depends="jar, compile-test">
198
+ <junit showoutput="true">
199
+ <classpath refid="test.classpath" />
200
+ <formatter type="brief" usefile="false" />
201
+ <batchtest fork="yes">
202
+ <fileset dir="${test.dir}">
203
+ <include name="*Test.java" />
204
+ <include name="**/*Test.java" />
205
+ </fileset>
206
+ </batchtest>
207
+ </junit>
208
+ </target>
209
+
210
+ <target name="cordova_debug" depends="build-javascript, debug">
211
+ </target>
212
+
213
+ <target name="cordova_release" depends="build-javascript, release">
214
+ </target>
215
+
216
+ </project>
@@ -0,0 +1,20 @@
1
+ # To enable ProGuard in your project, edit project.properties
2
+ # to define the proguard.config property as described in that file.
3
+ #
4
+ # Add project specific ProGuard rules here.
5
+ # By default, the flags in this file are appended to flags specified
6
+ # in ${sdk.dir}/tools/proguard/proguard-android.txt
7
+ # You can edit the include path and order by changing the ProGuard
8
+ # include property in project.properties.
9
+ #
10
+ # For more details, see
11
+ # http://developer.android.com/guide/developing/tools/proguard.html
12
+
13
+ # Add any project specific keep options here:
14
+
15
+ # If your project uses WebView with JS, uncomment the following
16
+ # and specify the fully qualified class name to the JavaScript interface
17
+ # class:
18
+ #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19
+ # public *;
20
+ #}
@@ -0,0 +1,14 @@
1
+ # This file is automatically generated by Android Tools.
2
+ # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3
+ #
4
+ # This file must be checked in Version Control Systems.
5
+ #
6
+ # To customize properties used by the Ant build system use,
7
+ # "ant.properties", and override values to adapt the script to your
8
+ # project structure.
9
+
10
+ # Indicates whether an apk should be generated for each density.
11
+ split.density=false
12
+ # Project target.
13
+ target=Google Inc.:Google APIs:15
14
+ apk-configurations=
@@ -0,0 +1,29 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
+ Licensed to the Apache Software Foundation (ASF) under one
4
+ or more contributor license agreements. See the NOTICE file
5
+ distributed with this work for additional information
6
+ regarding copyright ownership. The ASF licenses this file
7
+ to you under the Apache License, Version 2.0 (the
8
+ "License"); you may not use this file except in compliance
9
+ with the License. You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing,
14
+ software distributed under the License is distributed on an
15
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ KIND, either express or implied. See the License for the
17
+ specific language governing permissions and limitations
18
+ under the License.
19
+ -->
20
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
21
+ android:orientation="vertical"
22
+ android:layout_width="fill_parent"
23
+ android:layout_height="fill_parent"
24
+ >
25
+ <WebView android:id="@+id/appView"
26
+ android:layout_height="fill_parent"
27
+ android:layout_width="fill_parent"
28
+ />
29
+ </LinearLayout>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
+ Licensed to the Apache Software Foundation (ASF) under one
4
+ or more contributor license agreements. See the NOTICE file
5
+ distributed with this work for additional information
6
+ regarding copyright ownership. The ASF licenses this file
7
+ to you under the Apache License, Version 2.0 (the
8
+ "License"); you may not use this file except in compliance
9
+ with the License. You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing,
14
+ software distributed under the License is distributed on an
15
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ KIND, either express or implied. See the License for the
17
+ specific language governing permissions and limitations
18
+ under the License.
19
+ -->
20
+ <resources>
21
+ <string name="app_name">Cordova</string>
22
+ <string name="go">Snap</string>
23
+ </resources>
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
+ Licensed to the Apache Software Foundation (ASF) under one
4
+ or more contributor license agreements. See the NOTICE file
5
+ distributed with this work for additional information
6
+ regarding copyright ownership. The ASF licenses this file
7
+ to you under the Apache License, Version 2.0 (the
8
+ "License"); you may not use this file except in compliance
9
+ with the License. You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing,
14
+ software distributed under the License is distributed on an
15
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ KIND, either express or implied. See the License for the
17
+ specific language governing permissions and limitations
18
+ under the License.
19
+ -->
20
+ <cordova>
21
+ <!--
22
+ access elements control the Android whitelist.
23
+ Domains are assumed blocked unless set otherwise
24
+ -->
25
+
26
+ <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
27
+
28
+ <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
29
+ <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
30
+ <!-- <access origin=".*"/> Allow all domains, suggested development use only -->
31
+
32
+ <log level="DEBUG"/>
33
+ <preference name="classicRender" value="true" />
34
+ </cordova>
35
+
36
+
37
+
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
+ Licensed to the Apache Software Foundation (ASF) under one
4
+ or more contributor license agreements. See the NOTICE file
5
+ distributed with this work for additional information
6
+ regarding copyright ownership. The ASF licenses this file
7
+ to you under the Apache License, Version 2.0 (the
8
+ "License"); you may not use this file except in compliance
9
+ with the License. You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing,
14
+ software distributed under the License is distributed on an
15
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ KIND, either express or implied. See the License for the
17
+ specific language governing permissions and limitations
18
+ under the License.
19
+ -->
20
+ <plugins>
21
+ <plugin name="App" value="org.apache.cordova.App"/>
22
+ <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
23
+ <plugin name="Device" value="org.apache.cordova.Device"/>
24
+ <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
25
+ <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
26
+ <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
27
+ <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
28
+ <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
29
+ <plugin name="File" value="org.apache.cordova.FileUtils"/>
30
+ <plugin name="Network Status" value="org.apache.cordova.NetworkManager"/>
31
+ <plugin name="Notification" value="org.apache.cordova.Notification"/>
32
+ <plugin name="Storage" value="org.apache.cordova.Storage"/>
33
+ <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
34
+ <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
35
+ <plugin name="Capture" value="org.apache.cordova.Capture"/>
36
+ <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
37
+ </plugins>
@@ -0,0 +1,27 @@
1
+ /*
2
+ Licensed to the Apache Software Foundation (ASF) under one
3
+ or more contributor license agreements. See the NOTICE file
4
+ distributed with this work for additional information
5
+ regarding copyright ownership. The ASF licenses this file
6
+ to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance
8
+ with the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing,
13
+ software distributed under the License is distributed on an
14
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ KIND, either express or implied. See the License for the
16
+ specific language governing permissions and limitations
17
+ under the License.
18
+ */
19
+ package com.phonegap.api;
20
+
21
+ /**
22
+ * Plugin interface must be implemented by any plugin classes.
23
+ *
24
+ * The execute method is called by the PluginManager.
25
+ */
26
+ public interface IPlugin extends org.apache.cordova.api.IPlugin {
27
+ }
@@ -0,0 +1,28 @@
1
+ /*
2
+ Licensed to the Apache Software Foundation (ASF) under one
3
+ or more contributor license agreements. See the NOTICE file
4
+ distributed with this work for additional information
5
+ regarding copyright ownership. The ASF licenses this file
6
+ to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance
8
+ with the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing,
13
+ software distributed under the License is distributed on an
14
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ KIND, either express or implied. See the License for the
16
+ specific language governing permissions and limitations
17
+ under the License.
18
+ */
19
+ package com.phonegap.api;
20
+
21
+ /**
22
+ * Log to Android logging system.
23
+ *
24
+ * Log message can be a string or a printf formatted string with arguments.
25
+ * See http://developer.android.com/reference/java/util/Formatter.html
26
+ */
27
+ public class LOG extends org.apache.cordova.api.LOG {
28
+ }
@@ -0,0 +1,28 @@
1
+ /*
2
+ Licensed to the Apache Software Foundation (ASF) under one
3
+ or more contributor license agreements. See the NOTICE file
4
+ distributed with this work for additional information
5
+ regarding copyright ownership. The ASF licenses this file
6
+ to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance
8
+ with the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing,
13
+ software distributed under the License is distributed on an
14
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ KIND, either express or implied. See the License for the
16
+ specific language governing permissions and limitations
17
+ under the License.
18
+ */
19
+ package com.phonegap.api;
20
+
21
+ import android.app.Activity;
22
+
23
+ /**
24
+ * The Cordova activity abstract class that is extended by DroidGap.
25
+ * It is used to isolate plugin development, and remove dependency on entire Cordova library.
26
+ */
27
+ public abstract class PhonegapActivity extends Activity implements org.apache.cordova.api.CordovaInterface {
28
+ }
@@ -0,0 +1,27 @@
1
+ /*
2
+ Licensed to the Apache Software Foundation (ASF) under one
3
+ or more contributor license agreements. See the NOTICE file
4
+ distributed with this work for additional information
5
+ regarding copyright ownership. The ASF licenses this file
6
+ to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance
8
+ with the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing,
13
+ software distributed under the License is distributed on an
14
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ KIND, either express or implied. See the License for the
16
+ specific language governing permissions and limitations
17
+ under the License.
18
+ */
19
+ package com.phonegap.api;
20
+
21
+ /**
22
+ * Plugin interface must be implemented by any plugin classes.
23
+ *
24
+ * The execute method is called by the PluginManager.
25
+ */
26
+ public abstract class Plugin extends org.apache.cordova.api.Plugin {
27
+ }
@@ -0,0 +1,35 @@
1
+ /*
2
+ or more contributor license agreements. See the NOTICE file
3
+ distributed with this work for additional information
4
+ regarding copyright ownership. The ASF licenses this file
5
+ to you under the Apache License, Version 2.0 (the
6
+ "License"); you may not use this file except in compliance
7
+ with the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing,
12
+ software distributed under the License is distributed on an
13
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ KIND, either express or implied. See the License for the
15
+ specific language governing permissions and limitations
16
+ under the License.
17
+ */
18
+ package com.phonegap.api;
19
+
20
+ import org.apache.cordova.api.CordovaInterface;
21
+
22
+ import android.webkit.WebView;
23
+
24
+ /**
25
+ * PluginManager is exposed to JavaScript in the Cordova WebView.
26
+ *
27
+ * Calling native plugin code can be done by calling PluginManager.exec(...)
28
+ * from JavaScript.
29
+ */
30
+ public class PluginManager extends org.apache.cordova.api.PluginManager {
31
+
32
+ public PluginManager(WebView app, CordovaInterface ctx) {
33
+ super(app, ctx);
34
+ }
35
+ }
@@ -0,0 +1,53 @@
1
+ /*
2
+ Licensed to the Apache Software Foundation (ASF) under one
3
+ or more contributor license agreements. See the NOTICE file
4
+ distributed with this work for additional information
5
+ regarding copyright ownership. The ASF licenses this file
6
+ to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance
8
+ with the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing,
13
+ software distributed under the License is distributed on an
14
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ KIND, either express or implied. See the License for the
16
+ specific language governing permissions and limitations
17
+ under the License.
18
+ */
19
+ package com.phonegap.api;
20
+
21
+ import org.json.JSONArray;
22
+ import org.json.JSONObject;
23
+
24
+ public class PluginResult extends org.apache.cordova.api.PluginResult {
25
+
26
+ public PluginResult(Status status) {
27
+ super(status);
28
+ }
29
+
30
+ public PluginResult(Status status, String message) {
31
+ super(status, message);
32
+ }
33
+
34
+ public PluginResult(Status status, JSONArray message) {
35
+ super(status, message);
36
+ }
37
+
38
+ public PluginResult(Status status, JSONObject message) {
39
+ super(status, message);
40
+ }
41
+
42
+ public PluginResult(Status status, int i) {
43
+ super(status, i);
44
+ }
45
+
46
+ public PluginResult(Status status, float f) {
47
+ super(status, f);
48
+ }
49
+
50
+ public PluginResult(Status status, boolean b) {
51
+ super(status, b);
52
+ }
53
+ }