← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/android1 into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/android1 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~trb143/openlp/android1/+merge/58980

First attempt at Android code!
Fix Style in code using eclipse format.
Remove unused fields.
Fix alerts as per bug #741782

-- 
https://code.launchpad.net/~trb143/openlp/android1/+merge/58980
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/android1 into lp:openlp.
=== added file '.classpath'
--- .classpath	1970-01-01 00:00:00 +0000
+++ .classpath	2011-04-25 18:20:56 +0000
@@ -0,0 +1,8 @@
+<?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="lib" path="/home/samme/workspace/android/google-gson-1.6-release.zip"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

=== added file '.project'
--- .project	1970-01-01 00:00:00 +0000
+++ .project	2011-04-25 18:20:56 +0000
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>OpenlpRemote</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>

=== added file 'AndroidManifest.xml'
--- AndroidManifest.xml	1970-01-01 00:00:00 +0000
+++ AndroidManifest.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android";
+      package="org.openlp.android"
+      android:versionCode="1"
+      android:installLocation="auto"
+      android:versionName="0.1">
+    <uses-sdk android:minSdkVersion="3" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    
+    <application android:icon="@drawable/openlp_logo" android:label="@string/app_name">
+        <activity android:name=".openlp"
+                  android:label="@string/app_name">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+	<activity android:name="misc"></activity>
+    <activity android:name="PreferenceActivity"></activity>
+        <activity android:name="preferences"></activity>
+     <activity android:name="slide"></activity>
+    <activity android:name="service"></activity>
+    </application>
+</manifest>
\ No newline at end of file

=== added file 'OpenLP.apk'
Binary files OpenLP.apk	1970-01-01 00:00:00 +0000 and OpenLP.apk	2011-04-25 18:20:56 +0000 differ
=== added file 'android.apk'
Binary files android.apk	1970-01-01 00:00:00 +0000 and android.apk	2011-04-25 18:20:56 +0000 differ
=== added directory 'assets'
=== added directory 'bin'
=== added file 'bin/android.apk'
Binary files bin/android.apk	1970-01-01 00:00:00 +0000 and bin/android.apk	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/classes.dex'
Binary files bin/classes.dex	1970-01-01 00:00:00 +0000 and bin/classes.dex	2011-04-25 18:20:56 +0000 differ
=== added directory 'bin/org'
=== added directory 'bin/org/openlp'
=== added directory 'bin/org/openlp/android'
=== added file 'bin/org/openlp/android/R$attr.class'
Binary files bin/org/openlp/android/R$attr.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/R$attr.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/R$drawable.class'
Binary files bin/org/openlp/android/R$drawable.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/R$drawable.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/R$id.class'
Binary files bin/org/openlp/android/R$id.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/R$id.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/R$layout.class'
Binary files bin/org/openlp/android/R$layout.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/R$layout.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/R$menu.class'
Binary files bin/org/openlp/android/R$menu.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/R$menu.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/R$string.class'
Binary files bin/org/openlp/android/R$string.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/R$string.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/R$xml.class'
Binary files bin/org/openlp/android/R$xml.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/R$xml.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/R.class'
Binary files bin/org/openlp/android/R.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/R.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/misc$1.class'
Binary files bin/org/openlp/android/misc$1.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/misc$1.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/misc$2.class'
Binary files bin/org/openlp/android/misc$2.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/misc$2.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/misc$3.class'
Binary files bin/org/openlp/android/misc$3.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/misc$3.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/misc.class'
Binary files bin/org/openlp/android/misc.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/misc.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/openlp.class'
Binary files bin/org/openlp/android/openlp.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/openlp.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/preferences$1.class'
Binary files bin/org/openlp/android/preferences$1.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/preferences$1.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/preferences.class'
Binary files bin/org/openlp/android/preferences.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/preferences.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/service$1.class'
Binary files bin/org/openlp/android/service$1.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/service$1.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/service$2.class'
Binary files bin/org/openlp/android/service$2.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/service$2.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/service.class'
Binary files bin/org/openlp/android/service.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/service.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/slide$1.class'
Binary files bin/org/openlp/android/slide$1.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/slide$1.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/slide$2.class'
Binary files bin/org/openlp/android/slide$2.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/slide$2.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/org/openlp/android/slide.class'
Binary files bin/org/openlp/android/slide.class	1970-01-01 00:00:00 +0000 and bin/org/openlp/android/slide.class	2011-04-25 18:20:56 +0000 differ
=== added file 'bin/resources.ap_'
Binary files bin/resources.ap_	1970-01-01 00:00:00 +0000 and bin/resources.ap_	2011-04-25 18:20:56 +0000 differ
=== added directory 'bin/st'
=== added directory 'bin/st/sjobergsson'
=== added directory 'bin/st/sjobergsson/openlp'
=== added file 'default.properties'
--- default.properties	1970-01-01 00:00:00 +0000
+++ default.properties	2011-04-25 18:20:56 +0000
@@ -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,
+# "build.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-9

=== added directory 'gen'
=== added directory 'gen/org'
=== added directory 'gen/org/openlp'
=== added directory 'gen/org/openlp/android'
=== added file 'gen/org/openlp/android/R.java'
--- gen/org/openlp/android/R.java	1970-01-01 00:00:00 +0000
+++ gen/org/openlp/android/R.java	2011-04-25 18:20:56 +0000
@@ -0,0 +1,68 @@
+/* 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.openlp.android;
+
+public final class R {
+    public static final class attr {
+    }
+    public static final class drawable {
+        public static final int icon=0x7f020000;
+        public static final int openlp_logo=0x7f020001;
+    }
+    public static final class id {
+        public static final int alert=0x7f070003;
+        public static final int blank=0x7f070001;
+        public static final int list=0x7f070008;
+        public static final int listitem=0x7f070000;
+        public static final int next=0x7f070006;
+        public static final int port=0x7f07000a;
+        public static final int preferences=0x7f07000d;
+        public static final int prev=0x7f070005;
+        public static final int save=0x7f07000b;
+        public static final int send=0x7f070004;
+        public static final int services=0x7f070007;
+        public static final int slides=0x7f07000c;
+        public static final int unblank=0x7f070002;
+        public static final int url=0x7f070009;
+    }
+    public static final class layout {
+        public static final int listitem=0x7f030000;
+        public static final int main=0x7f030001;
+        public static final int misc=0x7f030002;
+        public static final int service=0x7f030003;
+        public static final int settings=0x7f030004;
+        public static final int slide=0x7f030005;
+    }
+    public static final class menu {
+        public static final int menu=0x7f060000;
+    }
+    public static final class string {
+        public static final int Service=0x7f05000a;
+        public static final int Slide=0x7f050009;
+        public static final int alert=0x7f050007;
+        public static final int app_name=0x7f050000;
+        public static final int blank=0x7f050005;
+        public static final int exit=0x7f050002;
+        public static final int fail=0x7f050010;
+        public static final int jsonfail=0x7f050011;
+        public static final int loading=0x7f050012;
+        public static final int misc=0x7f05000b;
+        public static final int next=0x7f050004;
+        public static final int port=0x7f05000d;
+        public static final int prev=0x7f050003;
+        public static final int save=0x7f05000e;
+        public static final int send=0x7f050008;
+        public static final int settings=0x7f050001;
+        public static final int unable=0x7f05000f;
+        public static final int unblank=0x7f050006;
+        public static final int url=0x7f05000c;
+    }
+    public static final class xml {
+        public static final int preferences=0x7f040000;
+    }
+}

=== added directory 'gen/st'
=== added directory 'gen/st/sjobergsson'
=== added directory 'gen/st/sjobergsson/openlp'
=== added file 'google-gson-1.6-release.zip'
Binary files google-gson-1.6-release.zip	1970-01-01 00:00:00 +0000 and google-gson-1.6-release.zip	2011-04-25 18:20:56 +0000 differ
=== added file 'proguard.cfg'
--- proguard.cfg	1970-01-01 00:00:00 +0000
+++ proguard.cfg	2011-04-25 18:20:56 +0000
@@ -0,0 +1,36 @@
+-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>;
+}
+
+-keepclasseswithmembernames class * {
+    public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembernames class * {
+    public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclassmembers enum * {
+    public static **[] values();
+    public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+  public static final android.os.Parcelable$Creator *;
+}

=== added directory 'res'
=== added directory 'res/drawable-hdpi'
=== added file 'res/drawable-hdpi/icon.png'
Binary files res/drawable-hdpi/icon.png	1970-01-01 00:00:00 +0000 and res/drawable-hdpi/icon.png	2011-04-25 18:20:56 +0000 differ
=== added file 'res/drawable-hdpi/openlp_logo.png'
Binary files res/drawable-hdpi/openlp_logo.png	1970-01-01 00:00:00 +0000 and res/drawable-hdpi/openlp_logo.png	2011-04-25 18:20:56 +0000 differ
=== added directory 'res/drawable-ldpi'
=== added file 'res/drawable-ldpi/icon.png'
Binary files res/drawable-ldpi/icon.png	1970-01-01 00:00:00 +0000 and res/drawable-ldpi/icon.png	2011-04-25 18:20:56 +0000 differ
=== added file 'res/drawable-ldpi/openlp_logo.png'
Binary files res/drawable-ldpi/openlp_logo.png	1970-01-01 00:00:00 +0000 and res/drawable-ldpi/openlp_logo.png	2011-04-25 18:20:56 +0000 differ
=== added directory 'res/drawable-mdpi'
=== added file 'res/drawable-mdpi/icon.png'
Binary files res/drawable-mdpi/icon.png	1970-01-01 00:00:00 +0000 and res/drawable-mdpi/icon.png	2011-04-25 18:20:56 +0000 differ
=== added file 'res/drawable-mdpi/openlp_logo.png'
Binary files res/drawable-mdpi/openlp_logo.png	1970-01-01 00:00:00 +0000 and res/drawable-mdpi/openlp_logo.png	2011-04-25 18:20:56 +0000 differ
=== added directory 'res/layout'
=== added file 'res/layout/listitem.xml'
--- res/layout/listitem.xml	1970-01-01 00:00:00 +0000
+++ res/layout/listitem.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,13 @@
+<?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">
+    <LinearLayout
+    android:orientation="vertical"
+    android:layout_width="0dip" android:layout_weight="1"
+    android:layout_height="fill_parent">
+        <TextView
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:id="@+id/listitem" />
+    </LinearLayout>
+</LinearLayout>
\ No newline at end of file

=== added file 'res/layout/main.xml'
--- res/layout/main.xml	1970-01-01 00:00:00 +0000
+++ res/layout/main.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TabHost xmlns:android="http://schemas.android.com/apk/res/android";
+    android:id="@android:id/tabhost"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+    <LinearLayout
+        android:orientation="vertical"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:padding="5dp">
+        <TabWidget
+            android:id="@android:id/tabs"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content" />
+        <FrameLayout
+            android:id="@android:id/tabcontent"
+            android:layout_width="fill_parent"
+            android:layout_height="fill_parent"
+            android:padding="5dp" />
+    </LinearLayout>
+</TabHost>
+

=== added file 'res/layout/misc.xml'
--- res/layout/misc.xml	1970-01-01 00:00:00 +0000
+++ res/layout/misc.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+<Button android:text="@string/blank"
+android:id="@+id/blank"
+android:layout_width="fill_parent"
+android:layout_height="wrap_content"></Button>
+<Button android:text="@string/unblank"
+android:id="@+id/unblank"
+android:layout_width="fill_parent"
+android:layout_height="wrap_content"></Button>
+<TextView android:text="@string/alert"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content"/>
+<EditText android:id="@+id/alert"
+android:layout_height="wrap_content"
+android:text=""
+android:layout_width="match_parent"></EditText>
+<Button android:text="@string/send"
+android:id="@+id/send"
+android:layout_width="fill_parent"
+android:layout_height="wrap_content"></Button>
+</LinearLayout>
+

=== added file 'res/layout/service.xml'
--- res/layout/service.xml	1970-01-01 00:00:00 +0000
+++ res/layout/service.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+<Button android:text="@string/prev"
+android:id="@+id/prev"
+android:layout_width="fill_parent"
+android:layout_height="wrap_content"></Button>
+<Button android:text="@string/next"
+android:id="@+id/next"
+android:layout_width="fill_parent"
+android:layout_height="wrap_content"></Button>
+<TextView
+android:id="@+id/services"
+android:layout_width="fill_parent"
+android:layout_height="wrap_content"></TextView>
+<ListView android:id="@+id/list"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content" />
+</LinearLayout>

=== added file 'res/layout/settings.xml'
--- res/layout/settings.xml	1970-01-01 00:00:00 +0000
+++ res/layout/settings.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+<TextView android:text="@string/url"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content"/>
+<EditText android:id="@+id/url"
+android:layout_height="wrap_content"
+android:text="192.168.1."
+android:inputType="number"
+android:layout_width="match_parent"></EditText>
+<TextView android:text="@string/port"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content"/>
+<EditText android:id="@+id/port"
+android:layout_height="wrap_content"
+android:text="4316"
+android:layout_width="match_parent"
+android:inputType="number"></EditText>
+<Button android:text="@string/save"
+android:id="@+id/save"
+android:layout_width="fill_parent"
+android:layout_height="wrap_content"></Button>
+</LinearLayout>
+

=== added file 'res/layout/slide.xml'
--- res/layout/slide.xml	1970-01-01 00:00:00 +0000
+++ res/layout/slide.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+<Button android:text="@string/prev"
+android:id="@+id/prev" android:layout_width="fill_parent"
+android:layout_height="wrap_content"></Button>
+<Button android:text="@string/next"
+android:id="@+id/next"
+android:layout_width="fill_parent"
+android:layout_height="wrap_content"></Button>
+<TextView
+android:id="@+id/slides"
+android:layout_width="fill_parent"
+android:layout_height="wrap_content"></TextView>
+<ListView android:id="@+id/list"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content" />
+
+</LinearLayout>

=== added directory 'res/menu'
=== added file 'res/menu/menu.xml'
--- res/menu/menu.xml	1970-01-01 00:00:00 +0000
+++ res/menu/menu.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu
+  xmlns:android="http://schemas.android.com/apk/res/android";>
+    <item android:enabled="true" android:titleCondensed="@string/settings" android:title="@string/settings" android:id="@+id/preferences"></item>
+</menu>

=== added directory 'res/values'
=== added directory 'res/values-en'
=== added file 'res/values-en/strings.xml'
--- res/values-en/strings.xml	1970-01-01 00:00:00 +0000
+++ res/values-en/strings.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">Openlp</string>
+    <string name="settings">Settings</string>
+    <string name="exit">Exit</string>
+    <string name="prev">Previous</string>
+    <string name="next">Next</string>
+    <string name="alert">Alert:</string>
+    <string name="blank">Blank</string>
+    <string name="unblank">Unblank</string>
+    <string name="send">Send</string>
+    <string name="Slide">Slide</string>
+    <string name="Service">Service</string>
+    <string name="misc">Miscellaneous</string>
+    <string name="url">Server</string>
+    <string name="port">Port</string>
+    <string name="save">Save</string>
+    <string name="unable">Unable to load page -</string>
+    <string name="fail">Connection failed</string>
+    <string name="jsonfail">JSON failed</string>
+    <string name="loading">Connecting...</string>
+</resources>

=== added directory 'res/values-sv'
=== added file 'res/values-sv/strings.xml'
--- res/values-sv/strings.xml	1970-01-01 00:00:00 +0000
+++ res/values-sv/strings.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">Openlp</string>
+    <string name="settings">Inställningar</string>
+    <string name="exit">Avsluta</string>
+    <string name="prev">Föregående</string>
+    <string name="next">Nästa</string>
+    <string name="blank">Dölj</string>
+    <string name="unblank">Visa</string>
+    <string name="alert">Varning:</string>
+    <string name="send">Skicka</string>
+    <string name="Slide">Bild</string>
+    <string name="Service">Planering</string>
+    <string name="misc">Diverse</string>
+    <string name="url">Server</string>
+    <string name="port">Port</string>
+    <string name="save">Spara</string>
+    <string name="unable">Lyckas inte ladda sidan -</string>
+    <string name="fail">Anslutningen misslyckades</string>
+    <string name="jsonfail">JSON misslyckades</string>
+    <string name="loading">Ansluter...</string>
+</resources>

=== added file 'res/values/strings.xml'
--- res/values/strings.xml	1970-01-01 00:00:00 +0000
+++ res/values/strings.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">Openlp</string>
+    <string name="settings">Settings</string>
+    <string name="exit">Exit</string>
+    <string name="prev">Previous</string>
+    <string name="next">Next</string>
+    <string name="blank">Blank</string>
+    <string name="unblank">Unblank</string>
+    <string name="alert">Alert:</string>
+    <string name="send">Send</string>
+    <string name="Slide">Slide</string>
+    <string name="Service">Service</string>
+    <string name="misc">Miscellaneous</string>
+    <string name="url">Server</string>
+    <string name="port">Port</string>
+    <string name="save">Save</string>
+    <string name="unable">Unable to load page -</string>
+    <string name="fail">Connection failed</string>
+    <string name="jsonfail">JSON failed</string>
+    <string name="loading">Connecting...</string>
+    
+</resources>

=== added directory 'res/xml'
=== added file 'res/xml/preferences.xml'
--- res/xml/preferences.xml	1970-01-01 00:00:00 +0000
+++ res/xml/preferences.xml	2011-04-25 18:20:56 +0000
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<PreferenceScreen
+  xmlns:android="http://schemas.android.com/apk/res/android";>
+  <PreferenceCategory
+		android:title="Server">
+		<EditTextPreference
+			android:title="url"
+			android:key="url"
+			android:name="@string/url"
+			android:defaultValue="192.168.1."
+			android:inputType="number"/>
+		<EditTextPreference
+			android:defaultValue="4316"
+			android:title="port"
+			android:key="port"
+			android:name="@string/url"
+			android:inputType="number"/>
+</PreferenceCategory>
+</PreferenceScreen>

=== added directory 'src'
=== added directory 'src/org'
=== added directory 'src/org/openlp'
=== added directory 'src/org/openlp/android'
=== added file 'src/org/openlp/android/misc.java'
--- src/org/openlp/android/misc.java	1970-01-01 00:00:00 +0000
+++ src/org/openlp/android/misc.java	2011-04-25 18:20:56 +0000
@@ -0,0 +1,133 @@
+package org.openlp.android;
+
+import java.io.IOException;
+
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.DefaultHttpClient;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.json.JSONStringer;
+
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+
+public class misc extends Activity {
+	public void onCreate(Bundle savedInstanceState) {
+		super.onCreate(savedInstanceState);
+		setContentView(R.layout.misc);
+		findViewById(R.id.blank).setOnClickListener(mBlank);
+		findViewById(R.id.unblank).setOnClickListener(mUnblank);
+		findViewById(R.id.send).setOnClickListener(mSend);
+	};
+
+	public Button.OnClickListener mBlank = new Button.OnClickListener() {
+		public void onClick(View v) {
+			final SharedPreferences prefs = getSharedPreferences("prefs",
+					MODE_PRIVATE);
+			final String url = prefs.getString("url", "http://192.168.0.3";);
+			final String port = prefs.getString("port", "4316");
+			final String urlAll = url + ":" + port + "/api/display/hide";
+			// Create a new HttpClient and post header
+			HttpClient httpclient = new DefaultHttpClient();
+			HttpGet httpget = new HttpGet(urlAll);
+
+			try {
+				// Execute HTTP Post Request
+				httpclient.execute(httpget);
+
+			} catch (ClientProtocolException e) {
+
+			} catch (IOException e) {
+
+			}
+		}
+	};
+
+	public Button.OnClickListener mUnblank = new Button.OnClickListener() {
+		public void onClick(View v) {
+			final SharedPreferences prefs = getSharedPreferences("prefs",
+					MODE_PRIVATE);
+			final String url = prefs.getString("url", "http://192.168.0.3";);
+			final String port = prefs.getString("port", "4316");
+			final String urlAll = url + ":" + port + "/api/display/show";
+			// Create a new HttpClient and post header
+			HttpClient httpclient = new DefaultHttpClient();
+			HttpGet httpget = new HttpGet(urlAll);
+
+			try {
+				// Execute HTTP Post Request
+				httpclient.execute(httpget);
+
+			} catch (ClientProtocolException e) {
+
+			} catch (IOException e) {
+
+			}
+		}
+	};
+
+	public Button.OnClickListener mSend = new Button.OnClickListener() {
+		public void onClick(View v) {
+			SharedPreferences prefs = getSharedPreferences("prefs",
+					MODE_PRIVATE);
+			String url = prefs.getString("url", "http://192.168.0.3";);
+			String port = prefs.getString("port", "4316");
+			EditText edittext = (EditText) findViewById(R.id.alert);
+			String alert;
+			try {
+				JSONObject jo = new JSONObject();
+				jo.put("text", edittext.getText());
+				alert = new JSONStringer().object().key("request").value(jo)
+						.endObject().toString();
+				alert = java.net.URLEncoder.encode(alert);
+			} catch (JSONException e) {
+				alert = e.toString();
+			}
+			String urlAll = (url + ":" + port + "/api/alert?data=" + alert);
+
+			// Create a new HttpClient and post header
+			HttpClient httpclient = new DefaultHttpClient();
+			HttpGet httpget = new HttpGet(urlAll);
+
+			try {
+				// Execute HTTP Post Request
+				httpclient.execute(httpget);
+
+			} catch (ClientProtocolException e) {
+
+			} catch (IOException e) {
+
+			}
+		}
+	};
+
+	@Override
+	public boolean onCreateOptionsMenu(Menu menu) {
+		MenuInflater inflater = getMenuInflater();
+		inflater.inflate(R.menu.menu, menu);
+		return true;
+	}
+
+	@Override
+	public boolean onOptionsItemSelected(MenuItem item) {
+		// Handle item selection
+		switch (item.getItemId()) {
+		case R.id.preferences:
+			startActivity(new Intent(this, preferences.class));
+			return true;
+		default:
+			return super.onOptionsItemSelected(item);
+		}
+	}
+}
\ No newline at end of file

=== added file 'src/org/openlp/android/openlp.java'
--- src/org/openlp/android/openlp.java	1970-01-01 00:00:00 +0000
+++ src/org/openlp/android/openlp.java	2011-04-25 18:20:56 +0000
@@ -0,0 +1,43 @@
+package org.openlp.android;
+
+import android.app.TabActivity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.widget.TabHost;
+
+public class openlp extends TabActivity {
+	/** Called when the activity is first created. */
+	@Override
+	public void onCreate(Bundle savedInstanceState) {
+		super.onCreate(savedInstanceState);
+
+		setContentView(R.layout.main);
+
+		//Resources res = getResources(); // Resource object to get drawables
+		TabHost tabHost = getTabHost(); // The activity TabHost
+		TabHost.TabSpec spec; // Reusable TabSpec for each tab
+		Intent intent; // Reusable Intent for each tab
+
+		// Create an Intent to launch an Activity for the tab (to be reused)
+		intent = new Intent().setClass(this, slide.class);
+
+		// Initialize a TabSpec for each tab and add it to the TabHost
+		spec = tabHost.newTabSpec("artists").setIndicator("Slide")
+				.setContent(intent);
+		tabHost.addTab(spec);
+		tabHost.setCurrentTab(1);
+
+		// Do the same for the other tabs
+		intent = new Intent().setClass(this, service.class);
+		spec = tabHost.newTabSpec("albums").setIndicator("Service")
+				.setContent(intent);
+		tabHost.addTab(spec);
+
+		// Do the same for the other tabs
+		intent = new Intent().setClass(this, misc.class);
+		spec = tabHost.newTabSpec("albums").setIndicator("Misc")
+				.setContent(intent);
+		tabHost.addTab(spec);
+
+	}
+}
\ No newline at end of file

=== added file 'src/org/openlp/android/preferences.java'
--- src/org/openlp/android/preferences.java	1970-01-01 00:00:00 +0000
+++ src/org/openlp/android/preferences.java	2011-04-25 18:20:56 +0000
@@ -0,0 +1,43 @@
+package org.openlp.android;
+
+import android.app.Activity;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+
+public class preferences extends Activity {
+	@Override
+	protected void onCreate(Bundle savedInstanceState) {
+		super.onCreate(savedInstanceState);
+		setContentView(R.layout.settings);
+		findViewById(R.id.save).setOnClickListener(mSend);
+		final EditText url1 = (EditText) findViewById(R.id.url);
+		final EditText port1 = (EditText) findViewById(R.id.port);
+		SharedPreferences settings = getSharedPreferences("prefs", 0);
+		url1.setText(settings.getString("url", "http://192.168.0.3";));
+		port1.setText(settings.getString("port", "4316"));
+	}
+
+	public Button.OnClickListener mSend = new Button.OnClickListener() {
+		public void onClick(View v) {
+			final EditText url1 = (EditText) findViewById(R.id.url);
+			final EditText port1 = (EditText) findViewById(R.id.port);
+			final String url = "" + url1.getText();
+			final String port = "" + port1.getText();
+
+			// We need an Editor object to make preference changes.
+			// All objects are from android.context.Context
+			SharedPreferences settings = getSharedPreferences("prefs", 0);
+			SharedPreferences.Editor editor = settings.edit();
+			editor.putString("url", url);
+			editor.putString("port", port);
+			url1.setText(settings.getString("url", "http://192.168.0.3";));
+			port1.setText(settings.getString("port", "4316"));
+
+			// Commit the edits!
+			editor.commit();
+		}
+	};
+}

=== added file 'src/org/openlp/android/service.java'
--- src/org/openlp/android/service.java	1970-01-01 00:00:00 +0000
+++ src/org/openlp/android/service.java	2011-04-25 18:20:56 +0000
@@ -0,0 +1,226 @@
+package org.openlp.android;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class service extends Activity {
+
+	private ListView lv1;
+
+	public void onCreate(Bundle savedInstanceState) {
+		super.onCreate(savedInstanceState);
+		final SharedPreferences prefs = getSharedPreferences("prefs",
+				MODE_PRIVATE);
+		setContentView(R.layout.service);
+		findViewById(R.id.prev).setOnClickListener(mPrev);
+		findViewById(R.id.next).setOnClickListener(mNext);
+		TextView txt = (TextView) findViewById(R.id.services);
+		// Set the text and call the connect function.
+		txt.setText(R.string.loading);
+		final String url = prefs.getString("url", "http://192.168.0.3";);
+		final String port = prefs.getString("port", "4316");
+		final String urlAll = url + ":" + port + "/api/service/list";
+		txt.setText(connect(urlAll));
+	}
+
+	private String connect(String url) {
+
+		// Create the httpclient
+		HttpClient httpclient = new DefaultHttpClient();
+
+		// Prepare a request object
+		HttpGet httpget = new HttpGet(url);
+
+		// Execute the request
+		HttpResponse response;
+
+		// return string
+		String returnString = null;
+
+		try {
+
+			// Open the webpage
+			response = httpclient.execute(httpget);
+			if (response.getStatusLine().getStatusCode() == 200) {
+				// Connection was established. Get the content.
+
+				HttpEntity entity = response.getEntity();
+				// If the response does not enclose an entity, there is no need
+				// to worry about connection release
+
+				if (entity != null) {
+					// A Simple JSON Response Read
+					InputStream instream = entity.getContent();
+
+					String result = convertStreamToString(instream);
+					Log.i("Praeda", result);
+
+					// Load the requested page converted to a string into a
+					// JSONObject.
+
+					// Build the return string.
+					JSONObject jObject = new JSONObject(result);
+
+					JSONObject results = jObject.getJSONObject("results");
+
+					JSONArray items = results.getJSONArray("items");
+
+					ArrayList<String> result1 = new ArrayList<String>();
+
+					returnString = "";
+
+					for (int i = 0; i < items.length(); i++) {
+
+						result1.add(items.getJSONObject(i).getString("title")
+								.toString());
+					}
+					lv1 = (ListView) findViewById(R.id.list);
+
+					lv1.setAdapter(new ArrayAdapter<String>(this,
+							android.R.layout.simple_list_item_1, result1));
+
+					// Cose the stream.
+					instream.close();
+				}
+			} else {
+				// code here for a response other than 200. A response 200 means
+				// the webpage was ok
+				// Other codes include 404 - not found, 301 - redirect etc...
+				// Display the response line.
+				returnString = "Unable to load page - "
+						+ response.getStatusLine();
+			}
+		} catch (IOException ex) {
+			// thrown by line 80 - getContent();
+			// Connection was not established
+			returnString = "Connection failed; " + ex.getMessage();
+		} catch (JSONException ex) {
+			// JSON errors
+			returnString = "JSON failed; " + ex.getMessage();
+		}
+		return returnString;
+	}
+
+	private static String convertStreamToString(InputStream is) {
+		/*
+		 * To convert the InputStream to String we use the
+		 * BufferedReader.readLine() method. We iterate until the BufferedReader
+		 * return null which means there's no more data to read. Each line will
+		 * appended to a StringBuilder and returned as String.
+		 */
+		BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+		StringBuilder sb = new StringBuilder();
+
+		String line = null;
+		try {
+			while ((line = reader.readLine()) != null) {
+				sb.append(line + "\n");
+			}
+		} catch (IOException e) {
+			e.printStackTrace();
+		} finally {
+			try {
+				is.close();
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+		}
+		return sb.toString();
+	}
+
+	;
+
+	public Button.OnClickListener mPrev = new Button.OnClickListener() {
+		public void onClick(View v) {
+			// TODO Auto-generated method stub
+			final SharedPreferences prefs = getSharedPreferences("prefs",
+					MODE_PRIVATE);
+			final String url = prefs.getString("url", "http://192.168.0.3";);
+			final String port = prefs.getString("port", "4316");
+			final String urlAll = url + ":" + port + "/api/service/previous";
+			// Create a new HttpClient and post header
+			HttpClient httpclient = new DefaultHttpClient();
+			HttpGet httpget = new HttpGet(urlAll);
+
+			try {
+				// Execute HTTP Post Request
+				httpclient.execute(httpget);
+
+			} catch (ClientProtocolException e) {
+
+			} catch (IOException e) {
+
+			}
+		}
+	};
+
+	public Button.OnClickListener mNext = new Button.OnClickListener() {
+		public void onClick(View v) {
+			// TODO Auto-generated method stub
+			final SharedPreferences prefs = getSharedPreferences("prefs",
+					MODE_PRIVATE);
+			final String url = prefs.getString("url", "http://192.168.0.3";);
+			final String port = prefs.getString("port", "4316");
+			final String urlAll = url + ":" + port + "/api/service/next";
+			// Create a new HttpClient and post header
+			HttpClient httpclient = new DefaultHttpClient();
+			HttpGet httpget = new HttpGet(urlAll);
+
+			try {
+				// Execute HTTP Post Request
+				httpclient.execute(httpget);
+
+			} catch (ClientProtocolException e) {
+
+			} catch (IOException e) {
+
+			}
+		}
+	};
+
+	@Override
+	public boolean onCreateOptionsMenu(Menu menu) {
+		MenuInflater inflater = getMenuInflater();
+		inflater.inflate(R.menu.menu, menu);
+		return true;
+	}
+
+	@Override
+	public boolean onOptionsItemSelected(MenuItem item) {
+		// Handle item selection
+		switch (item.getItemId()) {
+		case R.id.preferences:
+			startActivity(new Intent(this, preferences.class));
+			return true;
+		default:
+			return super.onOptionsItemSelected(item);
+		}
+	}
+}
\ No newline at end of file

=== added file 'src/org/openlp/android/slide.java'
--- src/org/openlp/android/slide.java	1970-01-01 00:00:00 +0000
+++ src/org/openlp/android/slide.java	2011-04-25 18:20:56 +0000
@@ -0,0 +1,228 @@
+package org.openlp.android;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class slide extends Activity {
+	private ListView lv1;
+
+	public void onCreate(Bundle savedInstanceState) {
+		super.onCreate(savedInstanceState);
+
+		setContentView(R.layout.slide);
+		findViewById(R.id.prev).setOnClickListener(mPrev);
+		findViewById(R.id.next).setOnClickListener(mNext);
+		TextView txt = (TextView) findViewById(R.id.slides);
+		// Set the text and call the connect function.
+		txt.setText(R.string.loading);
+		final SharedPreferences prefs = getSharedPreferences("prefs",
+				MODE_PRIVATE);
+		final String url = prefs.getString("url", "http://192.168.0.3";);
+		final String port = prefs.getString("port", "4316");
+		final String urlAll = url + ":" + port + "/api/controller/live/text";
+		txt.setText(connect(urlAll));
+	}
+
+	private String connect(String url) {
+
+		// Create the httpclient
+		HttpClient httpclient = new DefaultHttpClient();
+
+		// Prepare a request object
+		HttpGet httpget = new HttpGet(url);
+
+		// Execute the request
+		HttpResponse response;
+
+		// return string
+		String returnString = null;
+
+		try {
+
+			// Open the webpage
+			response = httpclient.execute(httpget);
+			if (response.getStatusLine().getStatusCode() == 200) {
+				// Connection was established. Get the content.
+
+				HttpEntity entity = response.getEntity();
+				// If the response does not enclose an entity, there is no need
+				// to worry about connection release
+
+				if (entity != null) {
+					// A Simple JSON Response Read
+					InputStream instream = entity.getContent();
+
+					String result = convertStreamToString(instream);
+					Log.i("Praeda", result);
+
+					// Load the requested page converted to a string into a
+					// JSONObject.
+
+					// Build the return string.
+					JSONObject jObject = new JSONObject(result);
+
+					JSONObject results = jObject.getJSONObject("results");
+
+					JSONArray slides = results.getJSONArray("slides");
+
+					ArrayList<String> result1 = new ArrayList<String>();
+
+					returnString = "";
+
+					for (int i = 0; i < slides.length(); i++) {
+
+						result1.add(slides.getJSONObject(i).getString("text")
+								.toString());
+					}
+					lv1 = (ListView) findViewById(R.id.list);
+
+					lv1.setAdapter(new ArrayAdapter<String>(this,
+							android.R.layout.simple_list_item_1, result1));
+
+					// Close the stream.
+					instream.close();
+				}
+			} else {
+				// code here for a response other than 200. A response 200 means
+				// the webpage was ok
+				// Other codes include 404 - not found, 301 - redirect etc...
+				// Display the response line.
+				returnString = "Unable to load page - "
+						+ response.getStatusLine();
+			}
+		} catch (IOException ex) {
+			// thrown by line 80 - getContent();
+			// Connection was not established
+			returnString = "Connection failed; " + ex.getMessage();
+		} catch (JSONException ex) {
+			// JSON errors
+			returnString = "JSON failed; " + ex.getMessage();
+		}
+		return returnString;
+	}
+
+	private static String convertStreamToString(InputStream is) {
+		/*
+		 * To convert the InputStream to String we use the
+		 * BufferedReader.readLine() method. We iterate until the BufferedReader
+		 * return null which means there's no more data to read. Each line will
+		 * appended to a StringBuilder and returned as String.
+		 */
+		BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+		StringBuilder sb = new StringBuilder();
+
+		String line = null;
+		try {
+			while ((line = reader.readLine()) != null) {
+				sb.append(line + "\n");
+			}
+		} catch (IOException e) {
+			e.printStackTrace();
+		} finally {
+			try {
+				is.close();
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+		}
+		return sb.toString();
+	}
+
+	;
+
+	public Button.OnClickListener mPrev = new Button.OnClickListener() {
+		public void onClick(View v) {
+			// TODO Auto-generated method stub
+			final SharedPreferences prefs = getSharedPreferences("prefs",
+					MODE_PRIVATE);
+			final String url = prefs.getString("url", "http://192.168.0.3";);
+			final String port = prefs.getString("port", "4316");
+			final String urlAll = url + ":" + port
+					+ "/api/controller/live/previous";
+			// Create a new HttpClient and post header
+			HttpClient httpclient = new DefaultHttpClient();
+			HttpGet httpget = new HttpGet(urlAll);
+
+			try {
+				// Execute HTTP Post Request
+				httpclient.execute(httpget);
+
+			} catch (ClientProtocolException e) {
+
+			} catch (IOException e) {
+
+			}
+		}
+	};
+
+	public Button.OnClickListener mNext = new Button.OnClickListener() {
+		public void onClick(View v) {
+			// TODO Auto-generated method stub
+			final SharedPreferences prefs = getSharedPreferences("prefs",
+					MODE_PRIVATE);
+			final String url = prefs.getString("url", "http://192.168.0.3";);
+			final String port = prefs.getString("port", "4316");
+			final String urlAll = url + ":" + port
+					+ "/api/controller/live/next";
+			// Create a new HttpClient and post header
+			HttpClient httpclient = new DefaultHttpClient();
+			HttpGet httpget = new HttpGet(urlAll);
+
+			try {
+				// Execute HTTP Post Request
+				httpclient.execute(httpget);
+
+			} catch (ClientProtocolException e) {
+
+			} catch (IOException e) {
+
+			}
+		}
+	};
+
+	@Override
+	public boolean onCreateOptionsMenu(Menu menu) {
+		MenuInflater inflater = getMenuInflater();
+		inflater.inflate(R.menu.menu, menu);
+		return true;
+	}
+
+	@Override
+	public boolean onOptionsItemSelected(MenuItem item) {
+		// Handle item selection
+		switch (item.getItemId()) {
+		case R.id.preferences:
+			startActivity(new Intent(this, preferences.class));
+			return true;
+		default:
+			return super.onOptionsItemSelected(item);
+		}
+	}
+}