diff options
author | Struan Donald <struan@exo.org.uk> | 2012-03-13 15:20:16 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-03-13 15:20:16 +0000 |
commit | 9e24fa120dc9b9399e0e66f0059b0c3338eafd91 (patch) | |
tree | 8465974bdcd084625804b4bc0169e75e29763750 /phonegap | |
parent | 8c0a530047789cbf2c393e6090ff5f2e1d8ef00a (diff) |
initial android phonegap app
Diffstat (limited to 'phonegap')
29 files changed, 205 insertions, 0 deletions
diff --git a/phonegap/Android/.classpath b/phonegap/Android/.classpath new file mode 100644 index 000000000..15cbbebc2 --- /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.5.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..9416b9b9e --- /dev/null +++ b/phonegap/Android/AndroidManifest.xml @@ -0,0 +1,28 @@ +<?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="15" /> + <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"/> + + <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/bin/Android.apk b/phonegap/Android/bin/Android.apk Binary files differnew file mode 100644 index 000000000..1c6b8741f --- /dev/null +++ b/phonegap/Android/bin/Android.apk diff --git a/phonegap/Android/bin/classes.dex b/phonegap/Android/bin/classes.dex Binary files differnew file mode 100644 index 000000000..6149f2a4f --- /dev/null +++ b/phonegap/Android/bin/classes.dex diff --git a/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/AndroidActivity.class b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/AndroidActivity.class Binary files differnew file mode 100644 index 000000000..b7f8f0bf4 --- /dev/null +++ b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/AndroidActivity.class diff --git a/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$attr.class b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$attr.class Binary files differnew file mode 100644 index 000000000..26f809395 --- /dev/null +++ b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$attr.class diff --git a/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$drawable.class b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$drawable.class Binary files differnew file mode 100644 index 000000000..4fb36e65f --- /dev/null +++ b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$drawable.class diff --git a/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$layout.class b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$layout.class Binary files differnew file mode 100644 index 000000000..2462aa149 --- /dev/null +++ b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$layout.class diff --git a/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$string.class b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$string.class Binary files differnew file mode 100644 index 000000000..82a3aa2e3 --- /dev/null +++ b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$string.class diff --git a/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$xml.class b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$xml.class Binary files differnew file mode 100644 index 000000000..b8acc084b --- /dev/null +++ b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R$xml.class diff --git a/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R.class b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R.class Binary files differnew file mode 100644 index 000000000..2c65d6442 --- /dev/null +++ b/phonegap/Android/bin/classes/org/mysociety/FixMyStreet/R.class diff --git a/phonegap/Android/bin/res/drawable-hdpi/ic_launcher.png b/phonegap/Android/bin/res/drawable-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..882eb148a --- /dev/null +++ b/phonegap/Android/bin/res/drawable-hdpi/ic_launcher.png diff --git a/phonegap/Android/bin/res/drawable-ldpi/ic_launcher.png b/phonegap/Android/bin/res/drawable-ldpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..18689f651 --- /dev/null +++ b/phonegap/Android/bin/res/drawable-ldpi/ic_launcher.png diff --git a/phonegap/Android/bin/res/drawable-mdpi/ic_launcher.png b/phonegap/Android/bin/res/drawable-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000..02e96b960 --- /dev/null +++ b/phonegap/Android/bin/res/drawable-mdpi/ic_launcher.png diff --git a/phonegap/Android/bin/resources.ap_ b/phonegap/Android/bin/resources.ap_ Binary files differnew file mode 100644 index 000000000..d6d39aee6 --- /dev/null +++ b/phonegap/Android/bin/resources.ap_ 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.5.0.jar b/phonegap/Android/libs/cordova-1.5.0.jar Binary files differnew file mode 100644 index 000000000..03602eda8 --- /dev/null +++ b/phonegap/Android/libs/cordova-1.5.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..8da376af8 --- /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-15 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..4c651eea2 --- /dev/null +++ b/phonegap/Android/res/xml/plugins.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<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="Network Status" 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"/> +</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 |