mobile_template 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mobile_template/version.rb +1 -1
- data/mobile_template.gemspec +1 -1
- data/templates/assets/Gemfile +1 -1
- data/templates/assets/source/javascripts/vendor/cordova.js +2106 -1975
- data/templates/assets/source/javascripts/vendor/jquery.js +614 -477
- data/templates/assets/source/javascripts/vendor/jquery.mobile.js +519 -378
- data/templates/assets/source/stylesheets/vendor/jquery.mobile.css.scss +683 -502
- data/templates/cordova_android/VERSION +1 -1
- data/templates/cordova_android/bin/create +5 -1
- data/templates/cordova_android/bin/templates/project/cordova/create +5 -0
- data/templates/cordova_android/bin/templates/project/cordova/debug +1 -1
- data/templates/cordova_android/bin/templates/project/cordova/templates/project/AndroidManifest.xml +18 -25
- data/templates/cordova_android/bin/templates/project/cordova/templates/project/assets/www/index.html +6 -6
- data/templates/cordova_android/framework/assets/js/cordova.android.js +2106 -1975
- data/templates/cordova_android/framework/assets/www/index.html +1 -1
- data/templates/cordova_android/framework/build.xml +2 -42
- data/templates/cordova_android/framework/project.properties +1 -1
- data/templates/cordova_android/framework/res/drawable/splash.png +0 -0
- data/templates/cordova_android/framework/res/drawable-hdpi/icon.png +0 -0
- data/templates/cordova_android/framework/res/drawable-ldpi/icon.png +0 -0
- data/templates/cordova_android/framework/res/drawable-mdpi/icon.png +0 -0
- data/templates/cordova_android/framework/res/xml/plugins.xml +2 -1
- data/templates/cordova_android/framework/src/com/phonegap/api/PluginManager.java +1 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/AudioPlayer.java +24 -16
- data/templates/cordova_android/framework/src/org/apache/cordova/CameraLauncher.java +35 -10
- data/templates/cordova_android/framework/src/org/apache/cordova/ContactAccessor.java +2 -1
- data/templates/cordova_android/framework/src/org/apache/cordova/ContactAccessorSdk5.java +67 -65
- data/templates/cordova_android/framework/src/org/apache/cordova/ContactManager.java +51 -63
- data/templates/cordova_android/framework/src/org/apache/cordova/CordovaChromeClient.java +3 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/CordovaWebViewClient.java +6 -2
- data/templates/cordova_android/framework/src/org/apache/cordova/Device.java +108 -108
- data/templates/cordova_android/framework/src/org/apache/cordova/DroidGap.java +110 -77
- data/templates/cordova_android/framework/src/org/apache/cordova/FileTransfer.java +90 -44
- data/templates/cordova_android/framework/src/org/apache/cordova/FileUtils.java +20 -20
- data/templates/cordova_android/framework/src/org/apache/cordova/LinearLayoutSoftKeyboardDetect.java +2 -2
- data/templates/cordova_android/framework/src/org/apache/cordova/NetworkManager.java +7 -8
- data/templates/cordova_android/framework/src/org/apache/cordova/Notification.java +2 -2
- data/templates/cordova_android/framework/src/org/apache/cordova/SplashScreen.java +23 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/Storage.java +3 -3
- data/templates/cordova_android/framework/src/org/apache/cordova/api/CordovaInterface.java +2 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/api/PluginEntry.java +119 -0
- data/templates/cordova_android/framework/src/org/apache/cordova/api/PluginManager.java +260 -258
- data/templates/cordova_android/framework/src/org/apache/cordova/api/PluginResult.java +2 -2
- data/templates/cordova_android/releasenotes.md +42 -0
- data/templates/cordova_android/test/.classpath +8 -0
- data/templates/cordova_android/test/.project +33 -0
- data/templates/cordova_android/test/AndroidManifest.xml +87 -0
- data/templates/cordova_android/test/README.md +23 -0
- data/templates/cordova_android/test/ant.properties +17 -0
- data/templates/cordova_android/test/assets/www/backbuttonmultipage/index.html +23 -0
- data/templates/cordova_android/test/assets/www/backbuttonmultipage/sample2.html +23 -0
- data/templates/cordova_android/test/assets/www/backbuttonmultipage/sample3.html +26 -0
- data/templates/cordova_android/test/assets/www/background/index.html +99 -0
- data/templates/cordova_android/test/assets/www/background/index2.html +98 -0
- data/templates/cordova_android/test/assets/www/cordova-1.6.0.js +4985 -0
- data/templates/cordova_android/test/assets/www/cordova.js +2 -0
- data/templates/cordova_android/test/assets/www/htmlnotfound/error.html +1 -0
- data/templates/cordova_android/test/assets/www/iframe/index.html +33 -0
- data/templates/cordova_android/test/assets/www/iframe/index2.html +24 -0
- data/templates/cordova_android/test/assets/www/index.html +47 -0
- data/templates/cordova_android/test/assets/www/jqmtabbackbutton/index.html +49 -0
- data/templates/cordova_android/test/assets/www/jqmtabbackbutton/tab1.html +29 -0
- data/templates/cordova_android/test/assets/www/jqmtabbackbutton/tab2.html +30 -0
- data/templates/cordova_android/test/assets/www/jqmtabbackbutton/tab3.html +30 -0
- data/templates/cordova_android/test/assets/www/lifecycle/index.html +108 -0
- data/templates/cordova_android/test/assets/www/lifecycle/index2.html +104 -0
- data/templates/cordova_android/test/assets/www/main.js +150 -0
- data/templates/cordova_android/test/assets/www/master.css +117 -0
- data/templates/cordova_android/test/assets/www/menus/index.html +29 -0
- data/templates/cordova_android/test/assets/www/splashscreen/index.html +22 -0
- data/templates/cordova_android/test/assets/www/userwebview/index.html +49 -0
- data/templates/cordova_android/test/assets/www/whitelist/index.html +29 -0
- data/templates/cordova_android/test/assets/www/whitelist/index2.html +23 -0
- data/templates/cordova_android/test/assets/www/xhr/index.html +48 -0
- data/templates/cordova_android/test/build.xml +85 -0
- data/templates/cordova_android/test/libs/cordova-1.6.0.jar +0 -0
- data/templates/cordova_android/test/project.properties +11 -0
- data/templates/cordova_android/{framework → test}/res/drawable/icon.png +0 -0
- data/templates/cordova_android/test/res/drawable/sandy.jpg +0 -0
- data/templates/cordova_android/test/res/drawable-hdpi/ic_launcher.png +0 -0
- data/templates/cordova_android/test/res/drawable-ldpi/ic_launcher.png +0 -0
- data/templates/cordova_android/test/res/drawable-mdpi/ic_launcher.png +0 -0
- data/templates/cordova_android/test/res/layout/main.xml +13 -0
- data/templates/cordova_android/test/res/values/strings.xml +4 -0
- data/templates/cordova_android/{bin/templates/project/cordova/templates/project → test}/res/xml/cordova.xml +0 -0
- data/templates/cordova_android/{bin/templates/project/cordova/templates/project → test}/res/xml/plugins.xml +1 -1
- data/templates/cordova_android/test/src/org/apache/cordova/test/ActivityPlugin.java +81 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/FixWebView.java +43 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/backbuttonmultipage.java +30 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/background.java +34 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/errorurl.java +32 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/htmlnotfound.java +31 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/iframe.java +30 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/jqmtabbackbutton.java +30 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/lifecycle.java +30 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/loading.java +31 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/menus.java +80 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/splashscreen.java +35 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/tests.java +32 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/timeout.java +34 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/userwebview.java +72 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/whitelist.java +51 -0
- data/templates/cordova_android/test/src/org/apache/cordova/test/xhr.java +30 -0
- metadata +83 -30
- data/templates/cordova_android/framework/assets/js/accelerometer.js +0 -137
- data/templates/cordova_android/framework/assets/js/app.js +0 -89
- data/templates/cordova_android/framework/assets/js/battery.js +0 -134
- data/templates/cordova_android/framework/assets/js/camera.js +0 -168
- data/templates/cordova_android/framework/assets/js/capture.js +0 -203
- data/templates/cordova_android/framework/assets/js/compass.js +0 -168
- data/templates/cordova_android/framework/assets/js/contact.js +0 -310
- data/templates/cordova_android/framework/assets/js/cordova.js.base +0 -924
- data/templates/cordova_android/framework/assets/js/crypto.js +0 -54
- data/templates/cordova_android/framework/assets/js/device.js +0 -83
- data/templates/cordova_android/framework/assets/js/file.js +0 -1082
- data/templates/cordova_android/framework/assets/js/filetransfer.js +0 -125
- data/templates/cordova_android/framework/assets/js/geolocation.js +0 -209
- data/templates/cordova_android/framework/assets/js/header.txt +0 -19
- data/templates/cordova_android/framework/assets/js/media.js +0 -233
- data/templates/cordova_android/framework/assets/js/network.js +0 -100
- data/templates/cordova_android/framework/assets/js/notification.js +0 -133
- data/templates/cordova_android/framework/assets/js/position.js +0 -100
- data/templates/cordova_android/framework/assets/js/storage.js +0 -439
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.7.0
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#! /bin/sh
|
2
2
|
#
|
3
3
|
# create a cordova/android project
|
4
|
-
#
|
4
|
+
#
|
5
5
|
# USAGE
|
6
6
|
# ./create [path package activity]
|
7
7
|
#
|
@@ -34,6 +34,10 @@ cp ./framework/assets/www/cordova-$VERSION.js $PROJECT_PATH/.cordova/android/cor
|
|
34
34
|
# copy in cordova.jar
|
35
35
|
cp ./framework/cordova-$VERSION.jar $PROJECT_PATH/.cordova/android/cordova-$VERSION.jar
|
36
36
|
|
37
|
+
# copy in res/xml
|
38
|
+
cp ./framework/res/xml/cordova.xml $PROJECT_PATH/.cordova/android/cordova.xml
|
39
|
+
cp ./framework/res/xml/plugins.xml $PROJECT_PATH/.cordova/android/plugins.xml
|
40
|
+
|
37
41
|
# app properties
|
38
42
|
cat > $PROJECT_PATH/.cordova/config <<eom
|
39
43
|
VERSION=$VERSION
|
@@ -25,6 +25,11 @@ cp ./.cordova/android/cordova-$VERSION.js ./assets/www
|
|
25
25
|
# copy in cordova.jar
|
26
26
|
cp ./.cordova/android/cordova-$VERSION.jar ./libs
|
27
27
|
|
28
|
+
# copy in res/xml
|
29
|
+
mkdir ./res/xml
|
30
|
+
cp ./.cordova/android/cordova.xml ./res/xml
|
31
|
+
cp ./.cordova/android/plugins.xml ./res/xml
|
32
|
+
|
28
33
|
# copy in default activity
|
29
34
|
cat ./cordova/templates/Activity.java > $ACTIVITY_PATH
|
30
35
|
|
data/templates/cordova_android/bin/templates/project/cordova/templates/project/AndroidManifest.xml
CHANGED
@@ -2,12 +2,13 @@
|
|
2
2
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
|
3
3
|
package="__PACKAGE__" android:versionName="1.1" android:versionCode="5">
|
4
4
|
<supports-screens
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
android:largeScreens="true"
|
6
|
+
android:normalScreens="true"
|
7
|
+
android:smallScreens="true"
|
8
|
+
android:xlargeScreens="true"
|
9
|
+
android:resizeable="true"
|
10
|
+
android:anyDensity="true"
|
11
|
+
/>
|
11
12
|
|
12
13
|
<uses-permission android:name="android.permission.CAMERA" />
|
13
14
|
<uses-permission android:name="android.permission.VIBRATE" />
|
@@ -20,31 +21,23 @@
|
|
20
21
|
<uses-permission android:name="android.permission.RECORD_VIDEO"/>
|
21
22
|
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
22
23
|
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
23
|
-
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
|
24
|
-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
24
|
+
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
|
25
|
+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
25
26
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
26
27
|
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
27
28
|
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
|
28
29
|
|
29
|
-
<uses-feature android:name="android.hardware.camera" />
|
30
|
-
<uses-feature android:name="android.hardware.camera.autofocus" />
|
31
30
|
|
32
31
|
<application android:icon="@drawable/icon" android:label="@string/app_name"
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
</activity>
|
41
|
-
<activity android:name="org.apache.cordova.DroidGap" android:label="@string/app_name"
|
42
|
-
android:configChanges="orientation|keyboardHidden">
|
43
|
-
<intent-filter>
|
44
|
-
</intent-filter>
|
32
|
+
android:debuggable="true">
|
33
|
+
<activity android:name="__ACTIVITY__" android:label="@string/app_name"
|
34
|
+
android:configChanges="orientation|keyboardHidden">
|
35
|
+
<intent-filter>
|
36
|
+
<action android:name="android.intent.action.MAIN" />
|
37
|
+
<category android:name="android.intent.category.LAUNCHER" />
|
38
|
+
</intent-filter>
|
45
39
|
</activity>
|
46
40
|
</application>
|
47
41
|
|
48
|
-
|
49
|
-
</manifest>
|
50
|
-
|
42
|
+
<uses-sdk android:minSdkVersion="5" />
|
43
|
+
</manifest>
|
data/templates/cordova_android/bin/templates/project/cordova/templates/project/assets/www/index.html
CHANGED
@@ -4,13 +4,13 @@
|
|
4
4
|
<meta name="viewport" content="width=320; user-scalable=no" />
|
5
5
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
6
6
|
<title>PhoneGap</title>
|
7
|
-
|
8
|
-
|
9
|
-
|
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-1.7.0.js"></script>
|
9
|
+
<script type="text/javascript" charset="utf-8" src="main.js"></script>
|
10
10
|
|
11
11
|
</head>
|
12
12
|
<body onload="init();" id="stage" class="theme">
|
13
|
-
<h1>Welcome to
|
13
|
+
<h1>Welcome to Cordova!</h1>
|
14
14
|
<h2>this file is located at assets/www/index.html</h2>
|
15
15
|
<div id="info">
|
16
16
|
<h4>Platform: <span id="platform"> </span>, Version: <span id="version"> </span></h4>
|
@@ -25,14 +25,14 @@
|
|
25
25
|
</dl>
|
26
26
|
<a href="#" class="btn large" onclick="toggleAccel();">Toggle Accelerometer</a>
|
27
27
|
<a href="#" class="btn large" onclick="getLocation();">Get Location</a>
|
28
|
-
|
28
|
+
<a href="tel:411" class="btn large">Call 411</a>
|
29
29
|
<a href="#" class="btn large" onclick="beep();">Beep</a>
|
30
30
|
<a href="#" class="btn large" onclick="vibrate();">Vibrate</a>
|
31
31
|
<a href="#" class="btn large" onclick="show_pic();">Get a Picture</a>
|
32
32
|
<a href="#" class="btn large" onclick="get_contacts();return false;">Get Phone's Contacts</a>
|
33
33
|
<a href="#" class="btn large" onclick="check_network();return false;">Check Network</a>
|
34
34
|
<dl>
|
35
|
-
|
35
|
+
<dt>Compass Heading:</dt><dd id="h">Off</dd>
|
36
36
|
</dl>
|
37
37
|
<a href="#" class="btn large" onclick="toggleCompass();return false;">Toggle Compass</a>
|
38
38
|
<div id="viewport" class="viewport" style="display: none;">
|