mobile_template 0.0.1 → 0.0.2

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 (123) hide show
  1. data/lib/mobile_template/version.rb +1 -1
  2. data/mobile_template.gemspec +1 -1
  3. data/templates/assets/Gemfile +1 -1
  4. data/templates/assets/source/javascripts/vendor/cordova.js +2106 -1975
  5. data/templates/assets/source/javascripts/vendor/jquery.js +614 -477
  6. data/templates/assets/source/javascripts/vendor/jquery.mobile.js +519 -378
  7. data/templates/assets/source/stylesheets/vendor/jquery.mobile.css.scss +683 -502
  8. data/templates/cordova_android/VERSION +1 -1
  9. data/templates/cordova_android/bin/create +5 -1
  10. data/templates/cordova_android/bin/templates/project/cordova/create +5 -0
  11. data/templates/cordova_android/bin/templates/project/cordova/debug +1 -1
  12. data/templates/cordova_android/bin/templates/project/cordova/templates/project/AndroidManifest.xml +18 -25
  13. data/templates/cordova_android/bin/templates/project/cordova/templates/project/assets/www/index.html +6 -6
  14. data/templates/cordova_android/framework/assets/js/cordova.android.js +2106 -1975
  15. data/templates/cordova_android/framework/assets/www/index.html +1 -1
  16. data/templates/cordova_android/framework/build.xml +2 -42
  17. data/templates/cordova_android/framework/project.properties +1 -1
  18. data/templates/cordova_android/framework/res/drawable/splash.png +0 -0
  19. data/templates/cordova_android/framework/res/drawable-hdpi/icon.png +0 -0
  20. data/templates/cordova_android/framework/res/drawable-ldpi/icon.png +0 -0
  21. data/templates/cordova_android/framework/res/drawable-mdpi/icon.png +0 -0
  22. data/templates/cordova_android/framework/res/xml/plugins.xml +2 -1
  23. data/templates/cordova_android/framework/src/com/phonegap/api/PluginManager.java +1 -0
  24. data/templates/cordova_android/framework/src/org/apache/cordova/AudioPlayer.java +24 -16
  25. data/templates/cordova_android/framework/src/org/apache/cordova/CameraLauncher.java +35 -10
  26. data/templates/cordova_android/framework/src/org/apache/cordova/ContactAccessor.java +2 -1
  27. data/templates/cordova_android/framework/src/org/apache/cordova/ContactAccessorSdk5.java +67 -65
  28. data/templates/cordova_android/framework/src/org/apache/cordova/ContactManager.java +51 -63
  29. data/templates/cordova_android/framework/src/org/apache/cordova/CordovaChromeClient.java +3 -0
  30. data/templates/cordova_android/framework/src/org/apache/cordova/CordovaWebViewClient.java +6 -2
  31. data/templates/cordova_android/framework/src/org/apache/cordova/Device.java +108 -108
  32. data/templates/cordova_android/framework/src/org/apache/cordova/DroidGap.java +110 -77
  33. data/templates/cordova_android/framework/src/org/apache/cordova/FileTransfer.java +90 -44
  34. data/templates/cordova_android/framework/src/org/apache/cordova/FileUtils.java +20 -20
  35. data/templates/cordova_android/framework/src/org/apache/cordova/LinearLayoutSoftKeyboardDetect.java +2 -2
  36. data/templates/cordova_android/framework/src/org/apache/cordova/NetworkManager.java +7 -8
  37. data/templates/cordova_android/framework/src/org/apache/cordova/Notification.java +2 -2
  38. data/templates/cordova_android/framework/src/org/apache/cordova/SplashScreen.java +23 -0
  39. data/templates/cordova_android/framework/src/org/apache/cordova/Storage.java +3 -3
  40. data/templates/cordova_android/framework/src/org/apache/cordova/api/CordovaInterface.java +2 -0
  41. data/templates/cordova_android/framework/src/org/apache/cordova/api/PluginEntry.java +119 -0
  42. data/templates/cordova_android/framework/src/org/apache/cordova/api/PluginManager.java +260 -258
  43. data/templates/cordova_android/framework/src/org/apache/cordova/api/PluginResult.java +2 -2
  44. data/templates/cordova_android/releasenotes.md +42 -0
  45. data/templates/cordova_android/test/.classpath +8 -0
  46. data/templates/cordova_android/test/.project +33 -0
  47. data/templates/cordova_android/test/AndroidManifest.xml +87 -0
  48. data/templates/cordova_android/test/README.md +23 -0
  49. data/templates/cordova_android/test/ant.properties +17 -0
  50. data/templates/cordova_android/test/assets/www/backbuttonmultipage/index.html +23 -0
  51. data/templates/cordova_android/test/assets/www/backbuttonmultipage/sample2.html +23 -0
  52. data/templates/cordova_android/test/assets/www/backbuttonmultipage/sample3.html +26 -0
  53. data/templates/cordova_android/test/assets/www/background/index.html +99 -0
  54. data/templates/cordova_android/test/assets/www/background/index2.html +98 -0
  55. data/templates/cordova_android/test/assets/www/cordova-1.6.0.js +4985 -0
  56. data/templates/cordova_android/test/assets/www/cordova.js +2 -0
  57. data/templates/cordova_android/test/assets/www/htmlnotfound/error.html +1 -0
  58. data/templates/cordova_android/test/assets/www/iframe/index.html +33 -0
  59. data/templates/cordova_android/test/assets/www/iframe/index2.html +24 -0
  60. data/templates/cordova_android/test/assets/www/index.html +47 -0
  61. data/templates/cordova_android/test/assets/www/jqmtabbackbutton/index.html +49 -0
  62. data/templates/cordova_android/test/assets/www/jqmtabbackbutton/tab1.html +29 -0
  63. data/templates/cordova_android/test/assets/www/jqmtabbackbutton/tab2.html +30 -0
  64. data/templates/cordova_android/test/assets/www/jqmtabbackbutton/tab3.html +30 -0
  65. data/templates/cordova_android/test/assets/www/lifecycle/index.html +108 -0
  66. data/templates/cordova_android/test/assets/www/lifecycle/index2.html +104 -0
  67. data/templates/cordova_android/test/assets/www/main.js +150 -0
  68. data/templates/cordova_android/test/assets/www/master.css +117 -0
  69. data/templates/cordova_android/test/assets/www/menus/index.html +29 -0
  70. data/templates/cordova_android/test/assets/www/splashscreen/index.html +22 -0
  71. data/templates/cordova_android/test/assets/www/userwebview/index.html +49 -0
  72. data/templates/cordova_android/test/assets/www/whitelist/index.html +29 -0
  73. data/templates/cordova_android/test/assets/www/whitelist/index2.html +23 -0
  74. data/templates/cordova_android/test/assets/www/xhr/index.html +48 -0
  75. data/templates/cordova_android/test/build.xml +85 -0
  76. data/templates/cordova_android/test/libs/cordova-1.6.0.jar +0 -0
  77. data/templates/cordova_android/test/project.properties +11 -0
  78. data/templates/cordova_android/{framework → test}/res/drawable/icon.png +0 -0
  79. data/templates/cordova_android/test/res/drawable/sandy.jpg +0 -0
  80. data/templates/cordova_android/test/res/drawable-hdpi/ic_launcher.png +0 -0
  81. data/templates/cordova_android/test/res/drawable-ldpi/ic_launcher.png +0 -0
  82. data/templates/cordova_android/test/res/drawable-mdpi/ic_launcher.png +0 -0
  83. data/templates/cordova_android/test/res/layout/main.xml +13 -0
  84. data/templates/cordova_android/test/res/values/strings.xml +4 -0
  85. data/templates/cordova_android/{bin/templates/project/cordova/templates/project → test}/res/xml/cordova.xml +0 -0
  86. data/templates/cordova_android/{bin/templates/project/cordova/templates/project → test}/res/xml/plugins.xml +1 -1
  87. data/templates/cordova_android/test/src/org/apache/cordova/test/ActivityPlugin.java +81 -0
  88. data/templates/cordova_android/test/src/org/apache/cordova/test/FixWebView.java +43 -0
  89. data/templates/cordova_android/test/src/org/apache/cordova/test/backbuttonmultipage.java +30 -0
  90. data/templates/cordova_android/test/src/org/apache/cordova/test/background.java +34 -0
  91. data/templates/cordova_android/test/src/org/apache/cordova/test/errorurl.java +32 -0
  92. data/templates/cordova_android/test/src/org/apache/cordova/test/htmlnotfound.java +31 -0
  93. data/templates/cordova_android/test/src/org/apache/cordova/test/iframe.java +30 -0
  94. data/templates/cordova_android/test/src/org/apache/cordova/test/jqmtabbackbutton.java +30 -0
  95. data/templates/cordova_android/test/src/org/apache/cordova/test/lifecycle.java +30 -0
  96. data/templates/cordova_android/test/src/org/apache/cordova/test/loading.java +31 -0
  97. data/templates/cordova_android/test/src/org/apache/cordova/test/menus.java +80 -0
  98. data/templates/cordova_android/test/src/org/apache/cordova/test/splashscreen.java +35 -0
  99. data/templates/cordova_android/test/src/org/apache/cordova/test/tests.java +32 -0
  100. data/templates/cordova_android/test/src/org/apache/cordova/test/timeout.java +34 -0
  101. data/templates/cordova_android/test/src/org/apache/cordova/test/userwebview.java +72 -0
  102. data/templates/cordova_android/test/src/org/apache/cordova/test/whitelist.java +51 -0
  103. data/templates/cordova_android/test/src/org/apache/cordova/test/xhr.java +30 -0
  104. metadata +83 -30
  105. data/templates/cordova_android/framework/assets/js/accelerometer.js +0 -137
  106. data/templates/cordova_android/framework/assets/js/app.js +0 -89
  107. data/templates/cordova_android/framework/assets/js/battery.js +0 -134
  108. data/templates/cordova_android/framework/assets/js/camera.js +0 -168
  109. data/templates/cordova_android/framework/assets/js/capture.js +0 -203
  110. data/templates/cordova_android/framework/assets/js/compass.js +0 -168
  111. data/templates/cordova_android/framework/assets/js/contact.js +0 -310
  112. data/templates/cordova_android/framework/assets/js/cordova.js.base +0 -924
  113. data/templates/cordova_android/framework/assets/js/crypto.js +0 -54
  114. data/templates/cordova_android/framework/assets/js/device.js +0 -83
  115. data/templates/cordova_android/framework/assets/js/file.js +0 -1082
  116. data/templates/cordova_android/framework/assets/js/filetransfer.js +0 -125
  117. data/templates/cordova_android/framework/assets/js/geolocation.js +0 -209
  118. data/templates/cordova_android/framework/assets/js/header.txt +0 -19
  119. data/templates/cordova_android/framework/assets/js/media.js +0 -233
  120. data/templates/cordova_android/framework/assets/js/network.js +0 -100
  121. data/templates/cordova_android/framework/assets/js/notification.js +0 -133
  122. data/templates/cordova_android/framework/assets/js/position.js +0 -100
  123. data/templates/cordova_android/framework/assets/js/storage.js +0 -439
@@ -0,0 +1,117 @@
1
+ body {
2
+ background:#222 none repeat scroll 0 0;
3
+ color:#666;
4
+ font-family:Helvetica;
5
+ font-size:72%;
6
+ line-height:1.5em;
7
+ margin:0;
8
+ border-top:1px solid #393939;
9
+ }
10
+
11
+ #info{
12
+ background:#ffa;
13
+ border: 1px solid #ffd324;
14
+ -webkit-border-radius: 5px;
15
+ border-radius: 5px;
16
+ clear:both;
17
+ margin:15px 6px 0;
18
+ width:295px;
19
+ padding:4px 0px 2px 10px;
20
+ }
21
+
22
+ #info > h4{
23
+ font-size:.95em;
24
+ margin:5px 0;
25
+ }
26
+
27
+ #stage.theme{
28
+ padding-top:3px;
29
+ }
30
+
31
+ /* Definition List */
32
+ #stage.theme > dl{
33
+ padding-top:10px;
34
+ clear:both;
35
+ margin:0;
36
+ list-style-type:none;
37
+ padding-left:10px;
38
+ overflow:auto;
39
+ }
40
+
41
+ #stage.theme > dl > dt{
42
+ font-weight:bold;
43
+ float:left;
44
+ margin-left:5px;
45
+ }
46
+
47
+ #stage.theme > dl > dd{
48
+ width:45px;
49
+ float:left;
50
+ color:#a87;
51
+ font-weight:bold;
52
+ }
53
+
54
+ /* Content Styling */
55
+ #stage.theme > h1, #stage.theme > h2, #stage.theme > p{
56
+ margin:1em 0 .5em 13px;
57
+ }
58
+
59
+ #stage.theme > h1{
60
+ color:#eee;
61
+ font-size:1.6em;
62
+ text-align:center;
63
+ margin:0;
64
+ margin-top:15px;
65
+ padding:0;
66
+ }
67
+
68
+ #stage.theme > h2{
69
+ clear:both;
70
+ margin:0;
71
+ padding:3px;
72
+ font-size:1em;
73
+ text-align:center;
74
+ }
75
+
76
+ /* Stage Buttons */
77
+ #stage.theme a.btn{
78
+ border: 1px solid #555;
79
+ -webkit-border-radius: 5px;
80
+ border-radius: 5px;
81
+ text-align:center;
82
+ display:block;
83
+ float:left;
84
+ background:#444;
85
+ width:150px;
86
+ color:#9ab;
87
+ font-size:1.1em;
88
+ text-decoration:none;
89
+ padding:1.2em 0;
90
+ margin:3px 0px 3px 5px;
91
+ }
92
+ #stage.theme a.btn.large{
93
+ width:308px;
94
+ padding:1.2em 0;
95
+ }
96
+
97
+ /* Stage Buttons */
98
+ #stage.theme button.btn{
99
+ border: 1px solid #555;
100
+ -webkit-border-radius: 5px;
101
+ border-radius: 5px;
102
+ text-align:center;
103
+ display:block;
104
+ float:left;
105
+ background:#444;
106
+ width:150px;
107
+ color:#9ab;
108
+ font-size:1.1em;
109
+ text-decoration:none;
110
+ padding:1.2em 0;
111
+ margin:3px 0px 3px 5px;
112
+ }
113
+ #stage.theme button.btn.large{
114
+ width:308px;
115
+ padding:1.2em 0;
116
+ }
117
+
@@ -0,0 +1,29 @@
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=320; user-scalable=no" />
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
6
+ <title>Cordova Tests</title>
7
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
8
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
9
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
10
+ </head>
11
+ <body onload="init();" id="stage" class="theme">
12
+ <h1>Menu Test</h1>
13
+ <div id="info">
14
+ <h4>Platform: <span id="platform"> &nbsp;</span>, Version: <span id="version">&nbsp;</span></h4>
15
+ <h4>UUID: <span id="uuid"> &nbsp;</span>, Name: <span id="name">&nbsp;</span></h4>
16
+ <h4>Width: <span id="width"> &nbsp;</span>, Height: <span id="height">&nbsp;
17
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
18
+ </div>
19
+ <div id="info">
20
+ <h4>The menu items should be:</h4>
21
+ <li>Item1<br>
22
+ <li>Item2<br>
23
+ <li>Item3<br>
24
+ <h4>There is also a context menu. Touch and hold finger here to see:</h4>
25
+ <li>Context Item1<br>
26
+ </div>
27
+
28
+ </body>
29
+ </html>
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=320; user-scalable=no" />
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
6
+ <title>Cordova Tests</title>
7
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
8
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
9
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
10
+ </head>
11
+ <body onload="init();" id="stage" class="theme">
12
+ <h1>Splash Screen Test</h1>
13
+ <div id="info">
14
+ <h4>Platform: <span id="platform"> &nbsp;</span>, Version: <span id="version">&nbsp;</span></h4>
15
+ <h4>UUID: <span id="uuid"> &nbsp;</span>, Name: <span id="name">&nbsp;</span></h4>
16
+ <h4>Width: <span id="width"> &nbsp;</span>, Height: <span id="height">&nbsp;
17
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
18
+ </div>
19
+ <div id="info">
20
+ You should have seen the splash screen for 2 seconds.</div>
21
+ </body>
22
+ </html>
@@ -0,0 +1,49 @@
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=320; user-scalable=no" />
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
6
+ <title>Cordova Tests</title>
7
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
8
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
9
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
10
+ </head>
11
+ <body onload="init();" id="stage" class="theme">
12
+ <h1>User WebView/Client/Chrome Test</h1>
13
+ <div id="info">
14
+ <h4>Platform: <span id="platform"> &nbsp;</span>, Version: <span id="version">&nbsp;</span></h4>
15
+ <h4>UUID: <span id="uuid"> &nbsp;</span>, Name: <span id="name">&nbsp;</span></h4>
16
+ <h4>Width: <span id="width"> &nbsp;</span>, Height: <span id="height">&nbsp;
17
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
18
+ </div>
19
+ <div id="info">
20
+ <h4>The following should be seen in LogCat:</h4>
21
+ <li>userwebview: TestViewClient()<br>
22
+ <li>userwebview: TestChromeClient()<br>
23
+ <li>userwebview: onGeolocationPermissionsShowPrompt(file://)<br>
24
+ <li>userwebview: shouldOverrideUrlLoading(test://this_will_call_shouldOverrideUrlLoading)<br>
25
+
26
+ </div>
27
+ <script>
28
+ /**
29
+ * Get current location
30
+ */
31
+ console.log("getLocation()");
32
+
33
+ // Success callback
34
+ var success = function(p){
35
+ console.log("Location = "+p.coords.latitude+","+p.coords.longitude);
36
+ window.location = "test://this_will_call_shouldOverrideUrlLoading";
37
+ };
38
+
39
+ // Fail callback
40
+ var fail = function(e){
41
+ console.log("Error: "+e.code);
42
+ };
43
+
44
+ // Get location
45
+ navigator.geolocation.getCurrentPosition(success, fail, {enableHighAccuracy: true});
46
+
47
+ </script>
48
+ </body>
49
+ </html>
@@ -0,0 +1,29 @@
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=320; user-scalable=no" />
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
6
+ <title>Cordova Tests</title>
7
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
8
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
9
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
10
+ </head>
11
+ <body onload="init();" id="stage" class="theme">
12
+ <h1>Whitelist Page 1</h1>
13
+ <div id="info">
14
+ <h4>Platform: <span id="platform"> &nbsp;</span>, Version: <span id="version">&nbsp;</span></h4>
15
+ <h4>UUID: <span id="uuid"> &nbsp;</span>, Name: <span id="name">&nbsp;</span></h4>
16
+ <h4>Width: <span id="width"> &nbsp;</span>, Height: <span id="height">&nbsp;
17
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
18
+ </div>
19
+ <div id="info">
20
+ Loading Page 2 should be successful.<br>
21
+ Loading Page 3 should be in web browser.<br>
22
+ Loading Page 2 with target=_blank should be in web browser? <br>
23
+ (THIS DOESN'T HAPPEN.) https://issues.apache.org/jira/browse/CB-362
24
+ </div>
25
+ <a href="index2.html" class="btn large">Page 2</a>
26
+ <a href="http://www.google.com" class="btn large">Page 3</a>
27
+ <a href="index2.html" class="btn large" target="_blank">Page 2 with target=_blank</a>
28
+ </body>
29
+ </html>
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=320; user-scalable=no" />
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
6
+ <title>Cordova Tests</title>
7
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
8
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
9
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
10
+ </head>
11
+ <body onload="init();" id="stage" class="theme">
12
+ <h1>Whitelist Page 2</h1>
13
+ <div id="info">
14
+ <h4>Platform: <span id="platform"> &nbsp;</span>, Version: <span id="version">&nbsp;</span></h4>
15
+ <h4>UUID: <span id="uuid"> &nbsp;</span>, Name: <span id="name">&nbsp;</span></h4>
16
+ <h4>Width: <span id="width"> &nbsp;</span>, Height: <span id="height">&nbsp;
17
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
18
+ </div>
19
+ <div id="info">
20
+ Press "backbutton"
21
+ </div>
22
+ </body>
23
+ </html>
@@ -0,0 +1,48 @@
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=320; user-scalable=no" />
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
6
+ <title>Cordova Tests</title>
7
+ <link rel="stylesheet" href="../master.css" type="text/css" media="screen" title="no title">
8
+ <script type="text/javascript" charset="utf-8" src="../cordova.js"></script>
9
+ <script type="text/javascript" charset="utf-8" src="../main.js"></script>
10
+ <script>
11
+ function XHR(url) {
12
+ var xmlhttp = new XMLHttpRequest();
13
+ xmlhttp.onreadystatechange=function(){
14
+ if(xmlhttp.readyState === 4){
15
+ // If success
16
+ if (xmlhttp.status === 200) {
17
+ alert("XHR success. Result="+xmlhttp.responseText);
18
+ }
19
+ // If error
20
+ else {
21
+ alert("XHR error. Status="+xmlhttp.status);
22
+ }
23
+ }
24
+ };
25
+ console.log("GET "+url);
26
+ xmlhttp.open("GET", url , true);
27
+ xmlhttp.send();
28
+ }
29
+ </script>
30
+ </head>
31
+ <body onload="init();" id="stage" class="theme">
32
+ <h1>XHR</h1>
33
+ <div id="info">
34
+ <h4>Platform: <span id="platform"> &nbsp;</span>, Version: <span id="version">&nbsp;</span></h4>
35
+ <h4>UUID: <span id="uuid"> &nbsp;</span>, Name: <span id="name">&nbsp;</span></h4>
36
+ <h4>Width: <span id="width"> &nbsp;</span>, Height: <span id="height">&nbsp;
37
+ </span>, Color Depth: <span id="colorDepth"></span></h4>
38
+ </div>
39
+ <div id="info">
40
+ Press buttons below to test. You should see an alert with results displayed.
41
+ </div>
42
+ <a href="javascript:" class="btn large" onclick="XHR('file:///android_asset/www/xhr/index.html')">Load file://</a>
43
+ <a href="javascript:" class="btn large" onclick="XHR('http://www.google.com');">Load Google</a>
44
+ <!--
45
+ <a href="javascript:" class="btn large" onclick="XHR('content://com.android.contacts/data/1');">Load content://</a>
46
+ -->
47
+ </body>
48
+ </html>
@@ -0,0 +1,85 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project name="tests" default="help">
3
+
4
+ <!-- The local.properties file is created and updated by the 'android' tool.
5
+ It contains the path to the SDK. It should *NOT* be checked into
6
+ Version Control Systems. -->
7
+ <property file="local.properties" />
8
+
9
+ <!-- The ant.properties file can be created by you. It is only edited by the
10
+ 'android' tool to add properties to it.
11
+ This is the place to change some Ant specific build properties.
12
+ Here are some properties you may want to change/update:
13
+
14
+ source.dir
15
+ The name of the source directory. Default is 'src'.
16
+ out.dir
17
+ The name of the output directory. Default is 'bin'.
18
+
19
+ For other overridable properties, look at the beginning of the rules
20
+ files in the SDK, at tools/ant/build.xml
21
+
22
+ Properties related to the SDK location or the project target should
23
+ be updated using the 'android' tool with the 'update' action.
24
+
25
+ This file is an integral part of the build system for your
26
+ application and should be checked into Version Control Systems.
27
+
28
+ -->
29
+ <property file="ant.properties" />
30
+
31
+ <!-- The project.properties file is created and updated by the 'android'
32
+ tool, as well as ADT.
33
+
34
+ This contains project specific properties such as project target, and library
35
+ dependencies. Lower level build properties are stored in ant.properties
36
+ (or in .classpath for Eclipse projects).
37
+
38
+ This file is an integral part of the build system for your
39
+ application and should be checked into Version Control Systems. -->
40
+ <loadproperties srcFile="project.properties" />
41
+
42
+ <!-- quick check on sdk.dir -->
43
+ <fail
44
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
45
+ unless="sdk.dir"
46
+ />
47
+
48
+
49
+ <!-- extension targets. Uncomment the ones where you want to do custom work
50
+ in between standard targets -->
51
+ <!--
52
+ <target name="-pre-build">
53
+ </target>
54
+ <target name="-pre-compile">
55
+ </target>
56
+
57
+ /* This is typically used for code obfuscation.
58
+ Compiled code location: ${out.classes.absolute.dir}
59
+ If this is not done in place, override ${out.dex.input.absolute.dir} */
60
+ <target name="-post-compile">
61
+ </target>
62
+ -->
63
+
64
+ <!-- Import the actual build file.
65
+
66
+ To customize existing targets, there are two options:
67
+ - Customize only one target:
68
+ - copy/paste the target into this file, *before* the
69
+ <import> task.
70
+ - customize it to your needs.
71
+ - Customize the whole content of build.xml
72
+ - copy/paste the content of the rules files (minus the top node)
73
+ into this file, replacing the <import> task.
74
+ - customize to your needs.
75
+
76
+ ***********************
77
+ ****** IMPORTANT ******
78
+ ***********************
79
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
80
+ in order to avoid having your file be overridden by tools such as "android update project"
81
+ -->
82
+ <!-- version-tag: 1 -->
83
+ <import file="${sdk.dir}/tools/ant/build.xml" />
84
+
85
+ </project>
@@ -0,0 +1,11 @@
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
+ # Project target.
11
+ target=Google Inc.:Google APIs:14
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+ android:orientation="vertical"
4
+ android:layout_width="fill_parent"
5
+ android:layout_height="fill_parent"
6
+ >
7
+ <TextView
8
+ android:layout_width="fill_parent"
9
+ android:layout_height="wrap_content"
10
+ android:text="Hello World, tests"
11
+ />
12
+ </LinearLayout>
13
+
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources>
3
+ <string name="app_name">CordovaTests</string>
4
+ </resources>
@@ -9,7 +9,7 @@
9
9
  <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
10
10
  <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
11
11
  <plugin name="File" value="org.apache.cordova.FileUtils"/>
12
- <plugin name="Network Status" value="org.apache.cordova.NetworkManager"/>
12
+ <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
13
13
  <plugin name="Notification" value="org.apache.cordova.Notification"/>
14
14
  <plugin name="Storage" value="org.apache.cordova.Storage"/>
15
15
  <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
@@ -0,0 +1,81 @@
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 org.apache.cordova.test;
20
+
21
+ import org.apache.cordova.api.LOG;
22
+ import org.json.JSONArray;
23
+ import org.json.JSONException;
24
+
25
+ import android.content.Intent;
26
+
27
+ import com.phonegap.api.Plugin;
28
+ import com.phonegap.api.PluginResult;
29
+
30
+ /**
31
+ * This class provides a service.
32
+ */
33
+ public class ActivityPlugin extends Plugin {
34
+
35
+ static String TAG = "ActivityPlugin";
36
+
37
+ /**
38
+ * Constructor.
39
+ */
40
+ public ActivityPlugin() {
41
+ }
42
+
43
+ /**
44
+ * Executes the request and returns PluginResult.
45
+ *
46
+ * @param action The action to execute.
47
+ * @param args JSONArry of arguments for the plugin.
48
+ * @param callbackId The callback id used when calling back into JavaScript.
49
+ * @return A PluginResult object with a status and message.
50
+ */
51
+ @Override
52
+ public PluginResult execute(String action, JSONArray args, String callbackId) {
53
+ PluginResult.Status status = PluginResult.Status.OK;
54
+ String result = "";
55
+
56
+ try {
57
+ if (action.equals("start")) {
58
+ this.startActivity(args.getString(0));
59
+ }
60
+ return new PluginResult(status, result);
61
+ } catch (JSONException e) {
62
+ return new PluginResult(PluginResult.Status.JSON_EXCEPTION);
63
+ }
64
+ }
65
+
66
+ // --------------------------------------------------------------------------
67
+ // LOCAL METHODS
68
+ // --------------------------------------------------------------------------
69
+
70
+ public void startActivity(String className) {
71
+ try {
72
+ Intent intent = new Intent().setClass(this.ctx.getContext(), Class.forName(className));
73
+ LOG.d(TAG, "Starting activity %s", className);
74
+ this.ctx.startActivity(intent);
75
+ } catch (ClassNotFoundException e) {
76
+ e.printStackTrace();
77
+ LOG.e(TAG, "Error starting activity %s", className);
78
+ }
79
+ }
80
+
81
+ }
@@ -0,0 +1,43 @@
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 org.apache.cordova.test;
20
+
21
+ import android.content.Context;
22
+ import android.webkit.WebView;
23
+
24
+ public class FixWebView extends WebView {
25
+
26
+ public FixWebView(Context context) {
27
+ super(context);
28
+ }
29
+
30
+ @Override
31
+ public void pauseTimers() {
32
+ // Do nothing
33
+ }
34
+
35
+ /**
36
+ * This method is with different signature in order to stop the timers while move application to background
37
+ * @param realPause
38
+ */
39
+ public void pauseTimers(@SuppressWarnings("unused") boolean realPause) {
40
+ super.pauseTimers();
41
+ }
42
+
43
+ }
@@ -0,0 +1,30 @@
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 org.apache.cordova.test;
20
+
21
+ import android.os.Bundle;
22
+ import org.apache.cordova.*;
23
+
24
+ public class backbuttonmultipage extends DroidGap {
25
+ @Override
26
+ public void onCreate(Bundle savedInstanceState) {
27
+ super.onCreate(savedInstanceState);
28
+ super.loadUrl("file:///android_asset/www/backbuttonmultipage/index.html");
29
+ }
30
+ }
@@ -0,0 +1,34 @@
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 org.apache.cordova.test;
20
+
21
+ import android.os.Bundle;
22
+ import android.webkit.WebView;
23
+
24
+ import org.apache.cordova.*;
25
+
26
+ public class background extends DroidGap {
27
+ @Override
28
+ public void onCreate(Bundle savedInstanceState) {
29
+ super.onCreate(savedInstanceState);
30
+ //super.init(new FixWebView(this), new CordovaWebViewClient(this), new CordovaChromeClient(this));
31
+ super.setBooleanProperty("keepRunning", false);
32
+ super.loadUrl("file:///android_asset/www/background/index.html");
33
+ }
34
+ }