diff options
author | Struan Donald <struan@exo.org.uk> | 2012-06-15 12:23:54 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-06-15 12:23:54 +0100 |
commit | cc1aa4a6676db38eabed168327941c6aa93b4654 (patch) | |
tree | a7848a02a53b88e89450de4fd187e7939fb61e80 /phonegap/Android | |
parent | 3a25a77b31e955ae6db9f7bd22120ef421aa5d92 (diff) | |
parent | d0c522739862671cc0ffa5cc1611d3772fe732bd (diff) |
Merge branch 'phonegap'
Diffstat (limited to 'phonegap/Android')
-rw-r--r-- | phonegap/Android/.classpath | 9 | ||||
-rw-r--r-- | phonegap/Android/.project | 33 | ||||
-rw-r--r-- | phonegap/Android/AndroidManifest.xml | 30 | ||||
l--------- | phonegap/Android/assets/www | 1 | ||||
-rw-r--r-- | phonegap/Android/gen/org/mysociety/FixMyStreet/R.java | 27 | ||||
-rwxr-xr-x | phonegap/Android/libs/cordova-1.8.0.jar | bin | 0 -> 163938 bytes | |||
-rw-r--r-- | phonegap/Android/proguard.cfg | 40 | ||||
-rw-r--r-- | phonegap/Android/project.properties | 11 | ||||
-rw-r--r-- | phonegap/Android/res/drawable-hdpi/ic_launcher.png | bin | 0 -> 4147 bytes | |||
-rw-r--r-- | phonegap/Android/res/drawable-ldpi/ic_launcher.png | bin | 0 -> 1723 bytes | |||
-rw-r--r-- | phonegap/Android/res/drawable-mdpi/ic_launcher.png | bin | 0 -> 2574 bytes | |||
-rw-r--r-- | phonegap/Android/res/layout/main.xml | 12 | ||||
-rw-r--r-- | phonegap/Android/res/values/strings.xml | 7 | ||||
-rw-r--r-- | phonegap/Android/res/xml/cordova.xml | 5 | ||||
-rw-r--r-- | phonegap/Android/res/xml/plugins.xml | 38 | ||||
-rw-r--r-- | phonegap/Android/src/org/mysociety/FixMyStreet/AndroidActivity.java | 13 |
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 Binary files differnew file mode 100755 index 000000000..326fa8392 --- /dev/null +++ b/phonegap/Android/libs/cordova-1.8.0.jar 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 Binary files differnew file mode 100644 index 000000000..8074c4c57 --- /dev/null +++ b/phonegap/Android/res/drawable-hdpi/ic_launcher.png diff --git a/phonegap/Android/res/drawable-ldpi/ic_launcher.png b/phonegap/Android/res/drawable-ldpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..1095584ec --- /dev/null +++ b/phonegap/Android/res/drawable-ldpi/ic_launcher.png diff --git a/phonegap/Android/res/drawable-mdpi/ic_launcher.png b/phonegap/Android/res/drawable-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..a07c69fa5 --- /dev/null +++ b/phonegap/Android/res/drawable-mdpi/ic_launcher.png 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 |