aboutsummaryrefslogtreecommitdiffstats
path: root/phonegap/Android
diff options
context:
space:
mode:
authorDave Whiteland <dave@mysociety.org>2012-06-25 14:33:57 +0100
committerDave Whiteland <dave@mysociety.org>2012-06-25 14:33:57 +0100
commitf9fe02f91ac72ea2954ee68a5f32d96a237fcd67 (patch)
treef91d63ab3d6b9cd3555587090a541c870ecd3363 /phonegap/Android
parent67da8efc720d2d0bd22bd9fe8655b7e983b35bb4 (diff)
parent45b3040884d7089e7d8c6f4acccd657b91c92a04 (diff)
Merge branch 'master' into fmb-read-only
Conflicts: .gitignore bin/make_css perllib/FixMyStreet/Cobrand/FixMyStreet.pm
Diffstat (limited to 'phonegap/Android')
-rw-r--r--phonegap/Android/.classpath9
-rw-r--r--phonegap/Android/.project33
-rw-r--r--phonegap/Android/AndroidManifest.xml30
l---------phonegap/Android/assets/www1
-rw-r--r--phonegap/Android/gen/org/mysociety/FixMyStreet/R.java27
-rwxr-xr-xphonegap/Android/libs/cordova-1.8.0.jarbin0 -> 163938 bytes
-rw-r--r--phonegap/Android/proguard.cfg40
-rw-r--r--phonegap/Android/project.properties11
-rw-r--r--phonegap/Android/res/drawable-hdpi/ic_launcher.pngbin0 -> 4147 bytes
-rw-r--r--phonegap/Android/res/drawable-ldpi/ic_launcher.pngbin0 -> 1723 bytes
-rw-r--r--phonegap/Android/res/drawable-mdpi/ic_launcher.pngbin0 -> 2574 bytes
-rw-r--r--phonegap/Android/res/layout/main.xml12
-rw-r--r--phonegap/Android/res/values/strings.xml7
-rw-r--r--phonegap/Android/res/xml/cordova.xml5
-rw-r--r--phonegap/Android/res/xml/plugins.xml38
-rw-r--r--phonegap/Android/src/org/mysociety/FixMyStreet/AndroidActivity.java13
16 files changed, 226 insertions, 0 deletions
diff --git a/phonegap/Android/.classpath b/phonegap/Android/.classpath
new file mode 100644
index 000000000..075ed1757
--- /dev/null
+++ b/phonegap/Android/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry kind="lib" path="libs/cordova-1.8.0.jar"/>
+ <classpathentry kind="output" path="bin/classes"/>
+</classpath>
diff --git a/phonegap/Android/.project b/phonegap/Android/.project
new file mode 100644
index 000000000..72e54dea9
--- /dev/null
+++ b/phonegap/Android/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Android</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/phonegap/Android/AndroidManifest.xml b/phonegap/Android/AndroidManifest.xml
new file mode 100644
index 000000000..b9540ffbe
--- /dev/null
+++ b/phonegap/Android/AndroidManifest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.mysociety.FixMyStreet"
+ android:versionCode="1"
+ android:versionName="1.0" >
+
+ <uses-sdk android:minSdkVersion="10" />
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+ <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
+ <uses-permission android:name="android.permission.CAMERA"/>
+ <uses-permission android:name="android.permission.INTERNET"/>
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+
+ <application
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name">
+ <activity
+ android:name=".AndroidActivity"
+ android:label="@string/app_name" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+
+</manifest> \ No newline at end of file
diff --git a/phonegap/Android/assets/www b/phonegap/Android/assets/www
new file mode 120000
index 000000000..933a59978
--- /dev/null
+++ b/phonegap/Android/assets/www
@@ -0,0 +1 @@
+../../www \ No newline at end of file
diff --git a/phonegap/Android/gen/org/mysociety/FixMyStreet/R.java b/phonegap/Android/gen/org/mysociety/FixMyStreet/R.java
new file mode 100644
index 000000000..adcacc076
--- /dev/null
+++ b/phonegap/Android/gen/org/mysociety/FixMyStreet/R.java
@@ -0,0 +1,27 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found. It
+ * should not be modified by hand.
+ */
+
+package org.mysociety.FixMyStreet;
+
+public final class R {
+ public static final class attr {
+ }
+ public static final class drawable {
+ public static final int ic_launcher=0x7f020000;
+ }
+ public static final class layout {
+ public static final int main=0x7f030000;
+ }
+ public static final class string {
+ public static final int app_name=0x7f050001;
+ public static final int hello=0x7f050000;
+ }
+ public static final class xml {
+ public static final int cordova=0x7f040000;
+ public static final int plugins=0x7f040001;
+ }
+}
diff --git a/phonegap/Android/libs/cordova-1.8.0.jar b/phonegap/Android/libs/cordova-1.8.0.jar
new file mode 100755
index 000000000..326fa8392
--- /dev/null
+++ b/phonegap/Android/libs/cordova-1.8.0.jar
Binary files differ
diff --git a/phonegap/Android/proguard.cfg b/phonegap/Android/proguard.cfg
new file mode 100644
index 000000000..b1cdf17b5
--- /dev/null
+++ b/phonegap/Android/proguard.cfg
@@ -0,0 +1,40 @@
+-optimizationpasses 5
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-dontpreverify
+-verbose
+-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class com.android.vending.licensing.ILicensingService
+
+-keepclasseswithmembernames class * {
+ native <methods>;
+}
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclassmembers class * extends android.app.Activity {
+ public void *(android.view.View);
+}
+
+-keepclassmembers enum * {
+ public static **[] values();
+ public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+ public static final android.os.Parcelable$Creator *;
+}
diff --git a/phonegap/Android/project.properties b/phonegap/Android/project.properties
new file mode 100644
index 000000000..f049142c1
--- /dev/null
+++ b/phonegap/Android/project.properties
@@ -0,0 +1,11 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-10
diff --git a/phonegap/Android/res/drawable-hdpi/ic_launcher.png b/phonegap/Android/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 000000000..8074c4c57
--- /dev/null
+++ b/phonegap/Android/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/phonegap/Android/res/drawable-ldpi/ic_launcher.png b/phonegap/Android/res/drawable-ldpi/ic_launcher.png
new file mode 100644
index 000000000..1095584ec
--- /dev/null
+++ b/phonegap/Android/res/drawable-ldpi/ic_launcher.png
Binary files differ
diff --git a/phonegap/Android/res/drawable-mdpi/ic_launcher.png b/phonegap/Android/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 000000000..a07c69fa5
--- /dev/null
+++ b/phonegap/Android/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/phonegap/Android/res/layout/main.xml b/phonegap/Android/res/layout/main.xml
new file mode 100644
index 000000000..bc12cd823
--- /dev/null
+++ b/phonegap/Android/res/layout/main.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hello" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/phonegap/Android/res/values/strings.xml b/phonegap/Android/res/values/strings.xml
new file mode 100644
index 000000000..a4df04a14
--- /dev/null
+++ b/phonegap/Android/res/values/strings.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <string name="hello">Hello World, AndroidActivity!</string>
+ <string name="app_name">FixMyStreet</string>
+
+</resources> \ No newline at end of file
diff --git a/phonegap/Android/res/xml/cordova.xml b/phonegap/Android/res/xml/cordova.xml
new file mode 100644
index 000000000..c7b500003
--- /dev/null
+++ b/phonegap/Android/res/xml/cordova.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<cordova>
+ <access origin="http://127.0.0.1*"/>
+ <log level="DEBUG"/>
+</cordova>
diff --git a/phonegap/Android/res/xml/plugins.xml b/phonegap/Android/res/xml/plugins.xml
new file mode 100644
index 000000000..76879a1ce
--- /dev/null
+++ b/phonegap/Android/res/xml/plugins.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<plugins>
+ <plugin name="App" value="org.apache.cordova.App"/>
+ <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
+ <plugin name="Device" value="org.apache.cordova.Device"/>
+ <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
+ <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
+ <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
+ <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
+ <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
+ <plugin name="File" value="org.apache.cordova.FileUtils"/>
+ <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
+ <plugin name="Notification" value="org.apache.cordova.Notification"/>
+ <plugin name="Storage" value="org.apache.cordova.Storage"/>
+ <plugin name="Temperature" value="org.apache.cordova.TempListener"/>
+ <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
+ <plugin name="Capture" value="org.apache.cordova.Capture"/>
+ <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
+ <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
+</plugins>
diff --git a/phonegap/Android/src/org/mysociety/FixMyStreet/AndroidActivity.java b/phonegap/Android/src/org/mysociety/FixMyStreet/AndroidActivity.java
new file mode 100644
index 000000000..f5401fb27
--- /dev/null
+++ b/phonegap/Android/src/org/mysociety/FixMyStreet/AndroidActivity.java
@@ -0,0 +1,13 @@
+package org.mysociety.FixMyStreet;
+
+import android.os.Bundle;
+import org.apache.cordova.*;
+
+public class AndroidActivity extends DroidGap {
+ /** Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ super.loadUrl("file:///android_asset/www/index.html");
+ }
+} \ No newline at end of file
1'>931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364