← Back to team overview

openlp-android team mailing list archive

[Merge] lp:~trb143/openlp/android_05 into lp:openlp/android

 

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

Requested reviews:
  Johan Mynhardt (johanmynhardt)

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

Polling now works on Service, Slide and Misc
Pre build 1941 it runs once
Post build 1941 it polls at the rate set by new Properties.

Slide view amended to give Bold slide for current selected slide.

Code cleanups.

Added OpenLP.apk file for testers.
-- 
https://code.launchpad.net/~trb143/openlp/android_05/+merge/103005
Your team OpenLP Android Developers is subscribed to branch lp:openlp/android.
=== modified file '.bzrignore'
--- .bzrignore	2011-09-15 20:18:05 +0000
+++ .bzrignore	2012-04-22 08:52:22 +0000
@@ -11,3 +11,5 @@
 build.xml
 local.properties
 build.properties
+lint.xml
+

=== removed file '.classpath'
--- .classpath	2012-01-09 19:01:22 +0000
+++ .classpath	1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-<?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="output" path="bin/classes"/>
-</classpath>

=== modified file 'AndroidManifest.xml'
--- AndroidManifest.xml	2012-03-03 11:00:27 +0000
+++ AndroidManifest.xml	2012-04-22 08:52:22 +0000
@@ -3,8 +3,8 @@
         xmlns:android="http://schemas.android.com/apk/res/android";
 		android:installLocation="auto"
         package="org.openlp.android"
-        android:versionCode="3"
-        android:versionName="0.4"
+        android:versionCode="5"
+        android:versionName="0.5"
         >
     <uses-sdk android:minSdkVersion="8"/>
     <uses-permission android:name="android.permission.INTERNET"/>
@@ -31,8 +31,11 @@
                     android:resource="@xml/searchable"/>
         </activity>
 
+		<service android:name=".service.PingService"/>
+
         <activity android:name=".activity.Misc"/>
-        <activity android:name=".activity.Preferences" android:label="@string/preferences"/>
+        <activity android:name=".activity.Preferences" 
+        	android:label="@string/preferences"/>
         <activity android:name=".activity.Slide"/>
         <activity android:name=".activity.Service"/>
         <activity android:name=".activity.Alert"/>

=== modified file 'OpenLP.apk'
Binary files OpenLP.apk	2012-03-23 16:53:04 +0000 and OpenLP.apk	2012-04-22 08:52:22 +0000 differ
=== modified file 'proguard.cfg'
--- proguard.cfg	2011-03-08 21:02:48 +0000
+++ proguard.cfg	2012-04-22 08:52:22 +0000
@@ -14,15 +14,15 @@
 -keep public class * extends android.preference.Preference
 -keep public class com.android.vending.licensing.ILicensingService
 
--keepclasseswithmembernames class * {
+-keepclasseswithmembers class * {
     native <methods>;
 }
 
--keepclasseswithmembernames class * {
+-keepclasseswithmembersnames class * {
     public <init>(android.content.Context, android.util.AttributeSet);
 }
 
--keepclasseswithmembernames class * {
+-keepclasseswithmember class * {
     public <init>(android.content.Context, android.util.AttributeSet, int);
 }
 

=== added file 'res/values/backgroundTimeouts.xml'
--- res/values/backgroundTimeouts.xml	1970-01-01 00:00:00 +0000
+++ res/values/backgroundTimeouts.xml	2012-04-22 08:52:22 +0000
@@ -0,0 +1,18 @@
+<resources>
+    <string-array name="backgroundTimeEntries">
+        <item>None</item>
+		<item>5</item>
+		<item>10</item>
+		<item>15</item>
+		<item>20</item>
+		<item>30</item>
+	</string-array>
+	<string-array name="backgroundTimeValues">
+		<item>0</item>	    
+		<item>1800</item>
+		<item>3600</item>
+		<item>540</item>
+		<item>7200</item>
+		<item>10800</item>
+	</string-array>
+</resources>
\ No newline at end of file

=== modified file 'res/values/defaultValues.xml'
--- res/values/defaultValues.xml	2012-01-21 20:40:25 +0000
+++ res/values/defaultValues.xml	2012-04-22 08:52:22 +0000
@@ -7,5 +7,6 @@
     <!-- INTEGER -->
     <integer name="socketTimeoutDefaultValue">3000</integer>
     <integer name="connectionTimeoutDefaultValue">3000</integer>
+    <integer name="backgroundRefreshDefaultValue">3600</integer>    
     <integer name="textSizeDefaultValue">14</integer>    
 </resources>
\ No newline at end of file

=== modified file 'res/values/keyStrings.xml'
--- res/values/keyStrings.xml	2012-01-21 20:40:25 +0000
+++ res/values/keyStrings.xml	2012-04-22 08:52:22 +0000
@@ -1,5 +1,6 @@
 <resources>
     <string name="keyEnableCustomTimeout">enableCustomTimeout</string>
+    <string name="keyBackgroundService">backgroundService</string>
     <string name="keyConnectionTimeout">connectionTimeout</string>
     <string name="keyDisplayBlankType">blankType</string> 
     <string name="keyTextSize">textSize</string> 

=== modified file 'res/values/strings.xml'
--- res/values/strings.xml	2012-03-03 11:00:27 +0000
+++ res/values/strings.xml	2012-04-22 08:52:22 +0000
@@ -31,6 +31,9 @@
     <string name="displayDesktop">Desktop</string>
     <string name="displayBlankOn">Reset display from</string>
     <string name="displayBlankOff">Blank display to</string>
+    <string name="backgroundService">Refresh Displays</string>  
+    <string name="backgroundTaskSummary">Check to modify refresh settings</string>
+    <string name="backgroundTask">Refresh time (sec)</string>
     <string name="customTimeoutsSummary">Check to modify timeout settings</string>
     <string name="customTimeout">Custom Timeout</string>
     <string name="socketTimeout">Socket Timeout</string>

=== modified file 'res/xml/preferences.xml'
--- res/xml/preferences.xml	2012-01-21 20:40:25 +0000
+++ res/xml/preferences.xml	2012-04-22 08:52:22 +0000
@@ -37,6 +37,16 @@
                 android:inputType="number"/>
     </PreferenceCategory>
     <PreferenceCategory
+            android:title="@string/backgroundService">
+        <ListPreference
+                android:title="@string/backgroundTask"
+                android:key="@string/keyBackgroundService"
+                android:summary="@string/backgroundTaskSummary"
+                android:entries="@array/backgroundTimeEntries"
+                android:entryValues="@array/backgroundTimeValues"
+                android:defaultValue="@integer/backgroundRefreshDefaultValue"/>
+    </PreferenceCategory>          
+    <PreferenceCategory
             android:title="@string/customTimeout">
         <CheckBoxPreference
                 android:title="@string/enableCustomTimeouts"

=== modified file 'src/org/openlp/android/OpenLP.java'
--- src/org/openlp/android/OpenLP.java	2012-03-04 17:20:44 +0000
+++ src/org/openlp/android/OpenLP.java	2012-04-22 08:52:22 +0000
@@ -20,7 +20,6 @@
  *******************************************************************************/
 package org.openlp.android;
 
-import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
 import android.util.Log;
@@ -46,77 +45,90 @@
 		super.onCreate(savedInstanceState);
 		setContentView(R.layout.main);
 
-		if (getSharedPreferences(getString(R.string.keySharedPreferences),
-			Context.MODE_PRIVATE).getString(getString(R.string.keyHost),
-			"NONE").equals("NONE")
-			|| getSharedPreferences(
-			getString(R.string.keySharedPreferences),
-			Context.MODE_PRIVATE).getString(
-			getString(R.string.keyHost), null).equals(null)) {
+		if (prefs.getString(getString(R.string.keyHost), "NONE").equals("NONE")
+				|| prefs.getString(getString(R.string.keyHost), null).equals(
+						null)) {
 			Log.d(LOG_TAG,
-				"URL preference not set. Starting preference activity...");
+					"URL preference not set. Starting preference activity...");
 			Intent preferenceIntent = new Intent(this, Preferences.class);
 			startActivity(preferenceIntent);
 		}
 
-		findViewById(R.id.buttonService)
-			.setOnClickListener(onClickListenerService);
+		findViewById(R.id.buttonService).setOnClickListener(
+				onClickListenerService);
 		findViewById(R.id.buttonLive).setOnClickListener(onClickListenerLive);
-		findViewById(R.id.buttonDisplay)
-			.setOnClickListener(onClickListenerDisplay);
+		findViewById(R.id.buttonDisplay).setOnClickListener(
+				onClickListenerDisplay);
 		findViewById(R.id.buttonAlert).setOnClickListener(onClickListenerAlert);
 		findViewById(R.id.buttonStage).setOnClickListener(onClickListenerStage);
-		findViewById(R.id.buttonSearch)
-			.setOnClickListener(onClickListenerSearch);
-	}
-
-	private View.OnClickListener onClickListenerService =
-		new View.OnClickListener() {
-			@Override
-			public void onClick(View view) {
-				startActivity(new Intent(OpenLP.this, Service.class));
-			}
-		};
-
-	private View.OnClickListener onClickListenerLive =
-		new View.OnClickListener() {
-			@Override
-			public void onClick(View view) {
-				startActivity(new Intent(OpenLP.this, Slide.class));
-			}
-		};
-
-	private View.OnClickListener onClickListenerDisplay =
-		new View.OnClickListener() {
-			@Override
-			public void onClick(View view) {
-				startActivity(new Intent(OpenLP.this, Misc.class));
-			}
-		};
-
-	private View.OnClickListener onClickListenerAlert =
-		new View.OnClickListener() {
-			@Override
-			public void onClick(View view) {
-				startActivity(new Intent(OpenLP.this, Alert.class));
-			}
-		};
-
-	private View.OnClickListener onClickListenerStage =
-		new View.OnClickListener() {
-			@Override
-			public void onClick(View view) {
-				startActivity(new Intent(OpenLP.this, StageView.class));
-			}
-		};
-
-	private View.OnClickListener onClickListenerSearch =
-		new View.OnClickListener() {
-			@Override
-			public void onClick(View view) {
-				onSearchRequested();
-			}
-		};
+		findViewById(R.id.buttonSearch).setOnClickListener(
+				onClickListenerSearch);
+	}
+
+	@Override
+	public void onResume() {
+		super.onResume();
+		// startService(pingIntent);
+		// registerReceiver(broadcastReceiver, new
+		// IntentFilter(BroadcastService.BROADCAST_ACTION));
+	}
+
+	@Override
+	public void onPause() {
+		super.onPause();
+		// unregisterReceiver(broadcastReceiver);
+		// stopService(pingIntent);
+	}
+
+	@Override
+	public void onDestroy() {
+		super.onDestroy();
+		stopService(pingIntent);
+		// unregisterReceiver(broadcastReceiver);
+		// stopService(pingIntent);
+	}
+
+	private View.OnClickListener onClickListenerService = new View.OnClickListener() {
+		@Override
+		public void onClick(View view) {
+			startActivity(new Intent(OpenLP.this, Service.class));
+		}
+	};
+
+	private View.OnClickListener onClickListenerLive = new View.OnClickListener() {
+		@Override
+		public void onClick(View view) {
+			startActivity(new Intent(OpenLP.this, Slide.class));
+		}
+	};
+
+	private View.OnClickListener onClickListenerDisplay = new View.OnClickListener() {
+		@Override
+		public void onClick(View view) {
+			startActivity(new Intent(OpenLP.this, Misc.class));
+		}
+	};
+
+	private View.OnClickListener onClickListenerAlert = new View.OnClickListener() {
+		@Override
+		public void onClick(View view) {
+			startActivity(new Intent(OpenLP.this, Alert.class));
+		}
+	};
+
+	private View.OnClickListener onClickListenerStage = new View.OnClickListener() {
+		@Override
+		public void onClick(View view) {
+			startActivity(new Intent(OpenLP.this, StageView.class));
+		}
+	};
+
+	private View.OnClickListener onClickListenerSearch = new View.OnClickListener() {
+		@Override
+		public void onClick(View view) {
+			onSearchRequested();
+		}
+	};
 
 	private final String LOG_TAG = OpenLP.class.getName();
 }

=== modified file 'src/org/openlp/android/activity/DefaultActivity.java'
--- src/org/openlp/android/activity/DefaultActivity.java	2012-03-04 17:20:44 +0000
+++ src/org/openlp/android/activity/DefaultActivity.java	2012-04-22 08:52:22 +0000
@@ -21,15 +21,34 @@
 package org.openlp.android.activity;
 
 import android.app.Activity;
+import android.content.Context;
 import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import org.openlp.android.R;
 import org.openlp.android.api.Api;
-
+import org.openlp.android.service.PingService;
 
 public abstract class DefaultActivity extends Activity implements Api {
+
+	public SharedPreferences prefs;
+	public Intent pingIntent;
+
+	@Override
+	public void onCreate(Bundle savedInstanceState) {
+		super.onCreate(savedInstanceState);
+
+		prefs = getApplicationContext().getSharedPreferences(
+				getApplicationContext()
+						.getString(R.string.keySharedPreferences),
+				Context.MODE_PRIVATE);
+
+		pingIntent = new Intent(this, PingService.class);		
+	}
+
 	@Override
 	public boolean onCreateOptionsMenu(Menu menu) {
 		MenuInflater inflater = getMenuInflater();
@@ -41,14 +60,14 @@
 	public boolean onOptionsItemSelected(MenuItem item) {
 		// Handle item selection
 		switch (item.getItemId()) {
-			case R.id.preferences:
-				startActivity(new Intent(this, Preferences.class));
-				return true;
-			case R.id.menuSearch:
-				onSearchRequested();
-				return true;
-			default:
-				return super.onOptionsItemSelected(item);
+		case R.id.preferences:
+			startActivity(new Intent(this, Preferences.class));
+			return true;
+		case R.id.menuSearch:
+			onSearchRequested();
+			return true;
+		default:
+			return super.onOptionsItemSelected(item);
 		}
 	}
 }

=== modified file 'src/org/openlp/android/activity/Misc.java'
--- src/org/openlp/android/activity/Misc.java	2012-03-04 17:20:44 +0000
+++ src/org/openlp/android/activity/Misc.java	2012-04-22 08:52:22 +0000
@@ -20,30 +20,23 @@
  *******************************************************************************/
 package org.openlp.android.activity;
 
-import android.app.ProgressDialog;
+import org.openlp.android.R;
+import org.openlp.android.service.PingService;
+import org.openlp.android.utility.WebCallAsyncTask;
+
+import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
-import android.content.SharedPreferences;
-import android.os.AsyncTask;
+import android.content.IntentFilter;
 import android.os.Bundle;
 import android.util.Log;
 import android.view.View;
 import android.widget.Toast;
 import android.widget.ToggleButton;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.openlp.android.R;
-import org.openlp.android.data.Poll;
-import org.openlp.android.utility.JSONHandler;
-import org.openlp.android.utility.OpenLPHttpClient;
-import org.openlp.android.utility.WebCallAsyncTask;
-
-import java.util.Arrays;
 
 public class Misc extends DefaultActivity {
 	private final Context context = this;
 	Misc misc = this;
-	SharedPreferences prefs;
 	String displayType;
 
 	@Override
@@ -53,20 +46,12 @@
 		Log.i(LOG_TAG, "onCreate");
 		setContentView(R.layout.misc);
 
-		prefs = getApplicationContext().getSharedPreferences(
-			getApplicationContext()
-				.getString(R.string.keySharedPreferences),
-			Context.MODE_PRIVATE);
-		Log.d(LOG_TAG, prefs.getAll().toString());
-		displayType = prefs
-			.getString(
-				getApplicationContext().getString(
-					R.string.keyDisplayBlankType),
-				getApplicationContext().getString(
-					R.string.displayTypeValue));
+		displayType = prefs.getString(
+			getApplicationContext().getString(R.string.keyDisplayBlankType),
+			getApplicationContext().getString(R.string.displayTypeValue));
 		Log.d(LOG_TAG, "Pref Display Type = " + displayType);
 
-		final ToggleButton toggleButton =
+		final ToggleButton toggleButton = 
 			(ToggleButton) findViewById(R.id.toggleDisplayButton);
 
 		toggleButton.setOnClickListener(new View.OnClickListener() {
@@ -79,37 +64,29 @@
 					else {
 						Log.d(LOG_TAG, "onCLick Display Type = " + displayType);
 						if (displayType
-							.equals(getString(R.string.displayScreen))) {
+								.equals(getString(R.string.displayScreen))) {
 							Log.d(LOG_TAG, "Blank matched");
 							new WebCallAsyncTask(context)
-								.execute(DISPLAY_HIDE_SCREEN);
+									.execute(DISPLAY_HIDE_SCREEN);
 						}
 						else if (displayType
-							.equals(getString(R.string.displayTheme))) {
+								.equals(getString(R.string.displayTheme))) {
 							Log.d(LOG_TAG, "Theme matched");
 							new WebCallAsyncTask(context)
-								.execute(DISPLAY_HIDE_THEME);
+									.execute(DISPLAY_HIDE_THEME);
 						}
 						else {
 							Log.d(LOG_TAG, "Desktop matched");
 							new WebCallAsyncTask(context)
-								.execute(DISPLAY_HIDE_DESKTOP);
+									.execute(DISPLAY_HIDE_DESKTOP);
 						}
 					}
 				}
 				catch (Exception e) {
 					Toast.makeText(context, R.string.loadingFailed,
-						Toast.LENGTH_LONG).show();
+							Toast.LENGTH_LONG).show();
 					Log.e(LOG_TAG, e.toString());
 				}
-				try {
-					Thread.sleep(500);
-				}
-				catch (InterruptedException e) {
-					e.printStackTrace();
-				}
-				PollStatusTask poll = new PollStatusTask(misc);
-				poll.execute(POLL_STATUS);
 			}
 		});
 	}
@@ -118,139 +95,91 @@
 	protected void onResume() {
 		super.onResume();
 		Log.d(LOG_TAG, "Resume");
-		new PollStatusTask(this).execute(POLL_STATUS);
-	}
-
-	/**
-	 * Asynchronous task to Poll the status data.
-	 */
-	class PollStatusTask extends AsyncTask<String, Void, Poll> {
-		Misc miscActivity;
-		ProgressDialog progressDialog;
-		String error;
-
-		PollStatusTask(Misc miscActivity) {
-			this.miscActivity = miscActivity;
-		}
-
-		@Override
-		protected void onPreExecute() {
-			super.onPreExecute();
-			progressDialog = ProgressDialog.show(Misc.this,
-				getString(R.string.loading),
-				getString(R.string.loadingStatusInfo));
-		}
-
-		@Override
-		protected Poll doInBackground(String... strings) {
-			OpenLPHttpClient httpClient = new OpenLPHttpClient(
-				getApplicationContext());
-			HttpResponse response = null;
-			error = "";
-
-			Log.d(LOG_TAG, "Processing:" + Arrays.asList(strings));
-			try {
-				httpClient.setUrl(strings[0]);
-				if (httpClient.getUrl().getHost().trim().length() <= 0) {
-					startActivity(new Intent(miscActivity, Preferences.class));
-				}
-				else {
-					response = httpClient.execute();
-				}
-
-				if (response != null
-					&& response.getStatusLine().getStatusCode() == 200) {
-					HttpEntity entity = response.getEntity();
-
-					if (entity != null) {
-						Poll poll = JSONHandler.parsePollResponseJSON(entity);
-						Log.i(LOG_TAG,
-							String.format("Service Items: %s", poll));
-						return poll;
-					}
-				}
-				else {
-					error = String.format("%s %s",
-						getString(R.string.unable), response);
-				}
-			}
-			catch (Exception e) {
-				error = String.format("%s: %s", e.getClass()
-					.getSimpleName(), e.getMessage());
-			}
-			return null;
-		}
-
-		@Override
-		protected void onPostExecute(Poll poll) {
-			super.onPostExecute(poll);
-			final ToggleButton toggleButton = (ToggleButton)
-				findViewById(R.id.toggleDisplayButton);
-			if (poll == null) {
-				toggleButton.setEnabled(false);
+		startService(pingIntent);
+		registerReceiver(broadcastReceiver, new IntentFilter(
+				PingService.BROADCAST_ACTION));
+	}
+
+	@Override
+	public void onPause() {
+		super.onPause();
+		unregisterReceiver(broadcastReceiver);
+		stopService(pingIntent);
+	}
+
+	private BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
+		@Override
+		public void onReceive(Context context, Intent intent) {
+			Log.d(LOG_TAG, "onReceive");
+			updateUI(intent);
+		}
+	};
+
+	private void updateUI(Intent intent) {
+		Log.d(LOG_TAG, "updateUI");
+		Boolean isBlank = intent.getBooleanExtra("blank", false);
+		Boolean isTheme = intent.getBooleanExtra("theme", false);
+		Boolean isDisplayHidden = intent.getBooleanExtra("display", false);
+		Boolean inError = intent.getBooleanExtra("inError", true);
+		final ToggleButton toggleButton = 
+			(ToggleButton) findViewById(R.id.toggleDisplayButton);
+		if (inError) {
+			toggleButton.setEnabled(false);
+		}
+		else {
+			String onText = "";
+			String offText = "";
+
+			displayType = prefs.getString(
+					getApplicationContext().getString(
+							R.string.keyDisplayBlankType),
+					getApplicationContext()
+							.getString(R.string.displayTypeValue));
+			Log.d(LOG_TAG, "onPostExecute Display Type = " + displayType + " "
+					+ isDisplayHidden);
+			/*
+			 * Set display blanking to the preferences value
+			 */
+			if (displayType.equals(getString(R.string.displayScreen))) {
+				Log.d(LOG_TAG, "Blank called");
+				onText = context.getString(R.string.displayScreen);
+				offText = context.getString(R.string.displayScreen);
+			}
+			else if (displayType.equals(getString(R.string.displayTheme))) {
+				Log.d(LOG_TAG, "Theme called");
+				onText = context.getString(R.string.displayTheme);
+				offText = context.getString(R.string.displayTheme);
 			}
 			else {
-				String onText = "";
-				String offText = "";
-
-				displayType = prefs.getString(
-					getApplicationContext().getString(
-						R.string.keyDisplayBlankType),
-					getApplicationContext().getString(
-						R.string.displayTypeValue));
-				Log.d(LOG_TAG, "onPostExecute Display Type = " + displayType
-					+ " " + poll.isDisplayHidden());
-				/*
-				Set display blanking to the preferences value
-				*/
-				if (displayType.equals(getString(R.string.displayScreen))) {
-					Log.d(LOG_TAG, "Blank called");
+				Log.d(LOG_TAG, "Desktop called");
+				onText = context.getString(R.string.displayDesktop);
+				offText = context.getString(R.string.displayDesktop);
+			}
+			/*
+			 * Set display blanked to the off value to that of the screen
+			 */
+			if (isDisplayHidden) {
+				if (isBlank) {
+					Log.d(LOG_TAG, "Hidden Blank called");
 					onText = context.getString(R.string.displayScreen);
-					offText = context.getString(R.string.displayScreen);
 				}
-				else if (displayType.equals(getString(R.string.displayTheme))) {
-					Log.d(LOG_TAG, "Theme called");
+				else if (isTheme) {
+					Log.d(LOG_TAG, "Hidden Theme called");
 					onText = context.getString(R.string.displayTheme);
-					offText = context.getString(R.string.displayTheme);
 				}
 				else {
-					Log.d(LOG_TAG, "Desktop called");
+					Log.d(LOG_TAG, "Hidden Desktop called");
 					onText = context.getString(R.string.displayDesktop);
-					offText = context.getString(R.string.displayDesktop);
-				}
-				/*
-				Set display blanked to the off value to that of the screen
-				*/
-				if (poll.isDisplayHidden()) {
-					if (poll.isBlankedDisplayed()) {
-						Log.d(LOG_TAG, "Hidden Blank called");
-						onText = context.getString(R.string.displayScreen);
-					}
-					else if (poll.isThemeDisplayed()) {
-						Log.d(LOG_TAG, "Hidden Theme called");
-						onText = context.getString(R.string.displayTheme);
-					}
-					else {
-						Log.d(LOG_TAG, "Hidden Desktop called");
-						onText = context.getString(R.string.displayDesktop);
-					}
-				}
-				toggleButton.setTextOn(context
-					.getString(R.string.displayBlankOn) + " " + onText);
-				toggleButton.setTextOff(context
-					.getString(R.string.displayBlankOff) + " " + offText);
-				toggleButton.setEnabled(true);
-				toggleButton.setChecked(false);
-				if (poll.isDisplayHidden()) {
-					toggleButton.setChecked(true);
 				}
 			}
-			progressDialog.dismiss();
-
-			if (error != null && error.trim().length() > 0) {
-				Toast.makeText(context, R.string.connectionFailed,
-					Toast.LENGTH_LONG).show();
-				Toast.makeText(context, error, Toast.LENGTH_LONG).show();
+			toggleButton.setTextOn(context.getString(R.string.displayBlankOn)
+					+ " " + onText);
+			toggleButton.setTextOff(context.getString(R.string.displayBlankOff)
+					+ " " + offText);
+			toggleButton.setEnabled(true);
+			toggleButton.setChecked(false);
+			if (isDisplayHidden) {
+				toggleButton.setChecked(true);
 			}
 		}
 	}

=== modified file 'src/org/openlp/android/activity/Preferences.java'
--- src/org/openlp/android/activity/Preferences.java	2012-03-04 17:20:44 +0000
+++ src/org/openlp/android/activity/Preferences.java	2012-04-22 08:52:22 +0000
@@ -38,6 +38,12 @@
 			getString(R.string.keySharedPreferences));
 		addPreferencesFromResource(R.xml.preferences);
 	}
-
+	
+	@Override
+	public void onDestroy() {
+		super.onDestroy();
+		Log.d(LOG_TAG, "Destroying preferences");		
+	}	
+	
 	private final String LOG_TAG = Preferences.class.getName();
 }

=== modified file 'src/org/openlp/android/activity/Service.java'
--- src/org/openlp/android/activity/Service.java	2012-03-04 17:20:44 +0000
+++ src/org/openlp/android/activity/Service.java	2012-04-22 08:52:22 +0000
@@ -20,9 +20,25 @@
  *******************************************************************************/
 package org.openlp.android.activity;
 
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.openlp.android.R;
+import org.openlp.android.data.SlideItem;
+import org.openlp.android.service.PingService;
+import org.openlp.android.utility.JSONHandler;
+import org.openlp.android.utility.OpenLPHttpClient;
+import org.openlp.android.utility.SlideAdapter;
+import org.openlp.android.utility.WebCallAsyncTask;
+
 import android.app.Activity;
 import android.app.ProgressDialog;
+import android.content.BroadcastReceiver;
+import android.content.Context;
 import android.content.Intent;
+import android.content.IntentFilter;
 import android.os.AsyncTask;
 import android.os.Bundle;
 import android.util.Log;
@@ -32,17 +48,6 @@
 import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.Toast;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.openlp.android.R;
-import org.openlp.android.data.SlideItem;
-import org.openlp.android.utility.JSONHandler;
-import org.openlp.android.utility.OpenLPHttpClient;
-import org.openlp.android.utility.SlideAdapter;
-import org.openlp.android.utility.WebCallAsyncTask;
-
-import java.util.Arrays;
-import java.util.List;
 
 /**
  * Activity for managing service objects.
@@ -50,6 +55,7 @@
 public class Service extends DefaultActivity implements OpenLPNavigate {
 	private final Activity context = this;
 	private ListView listView;
+	private int currentService = 0;
 
 	@Override
 	public void onCreate(Bundle savedInstanceState) {
@@ -62,76 +68,101 @@
 		findViewById(R.id.next).setOnClickListener(onClickListenerNavigate);
 		listView.setOnItemClickListener(onItemClickListenerService);
 		listView.setOnItemLongClickListener(adapterViewOnItemLongClickListener);
-		((TextView) findViewById(R.id.slide_service_title)).setText(
-			R.string.tabService);
+		((TextView) findViewById(R.id.slide_service_title))
+				.setText(R.string.tabService);
 	}
 
-	private Button.OnClickListener onClickListenerNavigate =
-		new Button.OnClickListener() {
-			@Override
-			public void onClick(View v) {
-				if (v.getId() == R.id.prev) {
-					navigate(SERVICE_PREVIOUS);
-				}
-				else if (v.getId() == R.id.next) {
-					navigate(SERVICE_NEXT);
-				}
-			}
-		};
+	private Button.OnClickListener onClickListenerNavigate = new Button.OnClickListener() {
+		@Override
+		public void onClick(View v) {
+			if (v.getId() == R.id.prev) {
+				navigate(SERVICE_PREVIOUS);
+			}
+			else if (v.getId() == R.id.next) {
+				navigate(SERVICE_NEXT);
+			}
+		}
+	};
 
-	private ListView.OnItemClickListener onItemClickListenerService =
-		new AdapterView.OnItemClickListener() {
-			@Override
-			public void onItemClick(AdapterView<?> adapterView, View view,
-				int i,
+	private ListView.OnItemClickListener onItemClickListenerService = new AdapterView.OnItemClickListener() {
+		@Override
+		public void onItemClick(AdapterView<?> adapterView, View view, int i,
 				long l) {
-				setData(SERVICE_SET, i);
-			}
-		};
+			setData(SERVICE_SET, i);
+		}
+	};
 
-	private AdapterView.OnItemLongClickListener
-		adapterViewOnItemLongClickListener =
-		new AdapterView.OnItemLongClickListener() {
-			@Override
-			public boolean onItemLongClick(AdapterView<?> adapterView,
-				View view,
+	private AdapterView.OnItemLongClickListener adapterViewOnItemLongClickListener = new AdapterView.OnItemLongClickListener() {
+		@Override
+		public boolean onItemLongClick(AdapterView<?> adapterView, View view,
 				int i, long l) {
-				setData(SERVICE_SET, i);
-				startActivity(new Intent(context, Slide.class));
-				return true;
-			}
-		};
+			setData(SERVICE_SET, i);
+			startActivity(new Intent(context, Slide.class));
+			return true;
+		}
+	};
 
 	public void navigate(String direction) {
 		try {
 			new WebCallAsyncTask(context).execute(direction);
 		}
 		catch (Exception e) {
-			Toast.makeText(getApplicationContext(),
-				String.format("%s: %s", e.getClass().getSimpleName(),
-					e.getMessage()), Toast.LENGTH_SHORT).show();
+			Toast.makeText(
+					getApplicationContext(),
+					String.format("%s: %s", e.getClass().getSimpleName(),
+							e.getMessage()), Toast.LENGTH_SHORT).show();
 		}
 	}
 
 	public void setData(String apiPart, int id) {
 		try {
 			String response = JSONHandler.createRequestJSON("id",
-				Integer.toString(id));
+					Integer.toString(id));
 			new WebCallAsyncTask(context, apiPart).execute(response);
 		}
 		catch (JSONHandler.JSONHandlerException e) {
-			Toast.makeText(getApplicationContext(),
-				String.format("%s: %s", e.getClass().getSimpleName(),
-					e.getMessage()), Toast.LENGTH_LONG).show();
+			Toast.makeText(
+					getApplicationContext(),
+					String.format("%s: %s", e.getClass().getSimpleName(),
+							e.getMessage()), Toast.LENGTH_LONG).show();
 		}
 	}
 
-
 	@Override
 	protected void onResume() {
 		super.onResume();
 		Log.d(LOG_TAG, "Resume");
-		new FetchServiceItemsTask(this).execute(SERVICE_LIST);
+		startService(pingIntent);
+		registerReceiver(broadcastReceiver, new IntentFilter(
+				PingService.BROADCAST_ACTION));
+	}
+
+	@Override
+	public void onPause() {
+		super.onPause();
+		unregisterReceiver(broadcastReceiver);
+		stopService(pingIntent);
+	}
+
+	private BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
+		@Override
+		public void onReceive(Context context, Intent intent) {
+			Log.d(LOG_TAG, "onReceive");
+			updateUI(intent);
+		}
+	};
+
+	private void updateUI(Intent intent) {
+		Log.d(LOG_TAG, "updateUI");
+		int service = intent.getIntExtra("service", -1);
+		/*
+		 * Service has been updated so lets refresh it
+		 */
+		Log.d(LOG_TAG, "Service update " + service + " " + currentService);		
+		if (currentService != service) {
+			currentService = service;
+			new FetchServiceItemsTask(this).execute(SERVICE_LIST);
+		}
 	}
 
 	/**
@@ -150,14 +181,14 @@
 		protected void onPreExecute() {
 			super.onPreExecute();
 			progressDialog = ProgressDialog.show(Service.this,
-				getString(R.string.loading),
-				getString(R.string.loadingServiceItems));
+					getString(R.string.loading),
+					getString(R.string.loadingServiceItems));
 		}
 
 		@Override
 		protected SlideItem[] doInBackground(String... strings) {
 			OpenLPHttpClient httpClient = new OpenLPHttpClient(
-				getApplicationContext());
+					getApplicationContext());
 			HttpResponse response = null;
 			error = "";
 
@@ -165,34 +196,32 @@
 			try {
 				httpClient.setUrl(strings[0]);
 				if (httpClient.getUrl().getHost().trim().length() <= 0) {
-					startActivity(
-						new Intent(serviceActivity, Preferences.class));
+					startActivity(new Intent(serviceActivity, Preferences.class));
 				}
 				else {
 					response = httpClient.execute();
 				}
 
-				if (response != null && response.getStatusLine()
-					.getStatusCode() == 200) {
+				if (response != null
+						&& response.getStatusLine().getStatusCode() == 200) {
 					HttpEntity entity = response.getEntity();
 
 					if (entity != null) {
 						List<SlideItem> serviceItemList = JSONHandler
-							.parseServiceItemResponseJSON(
-								entity);
+								.parseServiceItemResponseJSON(entity);
 						Log.i(LOG_TAG, String.format("Service Items: %s",
-							serviceItemList));
-						return serviceItemList.toArray(new SlideItem[]{});
+								serviceItemList));
+						return serviceItemList.toArray(new SlideItem[] {});
 					}
 				}
 				else {
 					error = String.format("%s %s", getString(R.string.unable),
-						response);
+							response);
 				}
 			}
 			catch (Exception e) {
 				error = String.format("%s: %s", e.getClass().getSimpleName(),
-					e.getMessage());
+						e.getMessage());
 			}
 			return null;
 		}
@@ -201,15 +230,15 @@
 		protected void onPostExecute(SlideItem[] slides) {
 			super.onPostExecute(slides);
 			if (slides == null) {
-				slides = new SlideItem[]{};
+				slides = new SlideItem[] {};
 			}
-			listView.setAdapter(
-				new SlideAdapter(context, Arrays.asList(slides), false));
+			listView.setAdapter(new SlideAdapter(context,
+					Arrays.asList(slides), false));
 			progressDialog.dismiss();
 
 			if (error != null && error.trim().length() > 0) {
 				Toast.makeText(context, R.string.loadingFailed,
-					Toast.LENGTH_LONG).show();
+						Toast.LENGTH_LONG).show();
 				Log.e(LOG_TAG, error);
 			}
 		}

=== modified file 'src/org/openlp/android/activity/Slide.java'
--- src/org/openlp/android/activity/Slide.java	2012-03-04 17:20:44 +0000
+++ src/org/openlp/android/activity/Slide.java	2012-04-22 08:52:22 +0000
@@ -22,7 +22,10 @@
 
 import android.app.Activity;
 import android.app.ProgressDialog;
+import android.content.BroadcastReceiver;
+import android.content.Context;
 import android.content.Intent;
+import android.content.IntentFilter;
 import android.os.AsyncTask;
 import android.os.Bundle;
 import android.util.Log;
@@ -35,6 +38,7 @@
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
 import org.openlp.android.R;
+import org.openlp.android.service.PingService;
 import org.openlp.android.utility.JSONHandler;
 import org.openlp.android.utility.OpenLPHttpClient;
 import org.openlp.android.utility.SlideAdapter;
@@ -46,6 +50,8 @@
 public class Slide extends DefaultActivity implements OpenLPNavigate {
 	private final Activity context = this;
 	private ListView slideList;
+	private String currentItem = "";
+	private int currentSlide = -1;
 
 	public void onCreate(Bundle savedInstanceState) {
 		super.onCreate(savedInstanceState);
@@ -113,23 +119,56 @@
 			}
 		}
 	}
-
+	
 	@Override
 	protected void onResume() {
 		super.onResume();
 		Log.d(LOG_TAG, "Resume");
-
-		new FetchSlideItemsTask(this).execute(LIVE_TEXT);
-	}
+		startService(pingIntent);
+		registerReceiver(broadcastReceiver, new IntentFilter(
+				PingService.BROADCAST_ACTION));
+	}
+
+	@Override
+	public void onPause() {
+		super.onPause();
+		unregisterReceiver(broadcastReceiver);
+		stopService(pingIntent);
+	}
+
+	private BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
+		@Override
+		public void onReceive(Context context, Intent intent) {
+			Log.d(LOG_TAG, "onReceive");
+			updateUI(intent);
+		}
+	};	
+	
+	private void updateUI(Intent intent) {
+		Log.d(LOG_TAG, "updateUI");
+		String item = intent.getStringExtra("item");
+		int slide = intent.getIntExtra("slide",0);		
+		/*
+		 * Service Item or Slide has been updated so lets refresh it
+		 */
+		if (currentItem != item && currentSlide != slide) {
+			currentItem = item;
+			currentSlide = slide;
+			Log.d(LOG_TAG, "Updateing display for " + item + " " + slide);			
+			new FetchSlideItemsTask(this, slide).execute(LIVE_TEXT);
+		}
+	}	
 
 	class FetchSlideItemsTask extends
 		AsyncTask<String, Void, org.openlp.android.data.SlideItem[]> {
 		Slide slideActivity;
 		ProgressDialog progressDialog;
 		String error;
+		private int currentSlide;
 
-		FetchSlideItemsTask(Slide slideActivity) {
+		FetchSlideItemsTask(Slide slideActivity, int slide) {
 			this.slideActivity = slideActivity;
+			this.currentSlide = slide;
 		}
 
 		@Override
@@ -195,7 +234,7 @@
 				slides = new org.openlp.android.data.SlideItem[]{};
 			}
 			slideList.setAdapter(new SlideAdapter(context, Arrays
-				.asList(slides)));
+				.asList(slides), currentSlide ));
 			progressDialog.dismiss();
 
 			if (error != null && error.trim().length() > 0) {

=== modified file 'src/org/openlp/android/data/Poll.java'
--- src/org/openlp/android/data/Poll.java	2012-03-04 10:56:34 +0000
+++ src/org/openlp/android/data/Poll.java	2012-04-22 08:52:22 +0000
@@ -25,6 +25,7 @@
 
 	private int slide;
 	private String item;
+	private int service = -1;	
 	private boolean twelveHourDisplay = false;
 	private boolean blankedDisplayed = false;
 	private boolean themeDisplayed = false;
@@ -95,4 +96,11 @@
 	public void setDisplayHidden(boolean displayHidden) {
 		this.displayHidden = displayHidden;
 	}
+	public int getService() {
+		return service;
+	}
+
+	public void setService(int service) {
+		this.service = service;
+	}	
 }

=== modified file 'src/org/openlp/android/service/PingService.java'
--- src/org/openlp/android/service/PingService.java	2012-03-04 10:56:34 +0000
+++ src/org/openlp/android/service/PingService.java	2012-04-22 08:52:22 +0000
@@ -20,21 +20,146 @@
  *******************************************************************************/
 package org.openlp.android.service;
 
-import android.os.Bundle;
-import org.openlp.android.activity.Service;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.openlp.android.R;
+import org.openlp.android.data.Poll;
+import org.openlp.android.utility.JSONHandler;
+import org.openlp.android.utility.OpenLPHttpClient;
+import org.openlp.android.api.Api;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Handler;
+import android.os.IBinder;
+import android.util.Log;
+
+import android.app.Service;
 
 /**
- * TODO: The target is to have a ping service to know when something on the server changed,
- * TODO: and update accordingly
+ * Provides a background service started by activities to Poll the status 
+ * service to get the latest state of OpenLP.
+ * Each Activity will be responsible for handling the returned data,
+ * If the poll fails it will stop the timer to prevent it from running
+ * when it is not required.
  */
-public class PingService extends Service {
-	@Override
-	public void onCreate(Bundle savedInstanceState) {
-		super.onCreate(savedInstanceState);
-	}
-
-	@Override
-	protected void onResume() {
-		super.onResume();
-	}
-}
+public class PingService extends Service implements Api {
+
+	public static final String BROADCAST_ACTION = "org.openlp.PingService.Poll";
+	public SharedPreferences prefs;
+	private final Handler handler = new Handler();
+	private Intent intent;
+	private Long delay;
+	private Boolean runOnce = false;
+
+	private Context ctx;
+
+	public IBinder onBind(Intent arg0) {
+		return null;
+	}
+
+	@Override
+	public void onCreate() {
+		Log.d(LOG_TAG, "onCreate called");
+		super.onCreate();
+		prefs = getApplicationContext().getSharedPreferences(
+				getApplicationContext()
+						.getString(R.string.keySharedPreferences),
+				Context.MODE_PRIVATE);
+		ctx = this;
+		intent = new Intent(BROADCAST_ACTION);		
+		//startService();
+	}
+	
+	@Override
+	public void onStart(Intent intent, int startId){
+		Log.d(LOG_TAG, "onStart called");		
+		handler.removeCallbacks(startPoll);
+		int def = ctx.getResources().getInteger(
+				R.integer.backgroundRefreshDefaultValue);
+		delay = Long.parseLong(prefs.getString(
+				getString(R.string.keyBackgroundService),
+				String.valueOf(def)));
+		/*
+		 * Allow for a no polling but the need to run one loop to update UI.
+		 */
+		runOnce = false;
+		if (delay == 0){
+			delay = 1L;
+			runOnce = true; 
+		}
+		Log.d(LOG_TAG, "Config" + runOnce + " " + delay);
+		handler.postDelayed(startPoll, delay);
+	}
+	
+	private Runnable startPoll = new Runnable() {
+		public void run() {
+			Log.d(LOG_TAG, "Task fired");
+			OpenLPHttpClient httpClient = new OpenLPHttpClient(
+					getApplicationContext());
+			HttpResponse response = null;
+			String error = "";
+
+			try {
+				httpClient.setUrl(POLL_STATUS);
+				if (httpClient.getUrl().getHost().trim().length() <= 0) {
+					intent.putExtra("inError", true);						
+					sendBroadcast(intent);
+					handler.postDelayed(this, 1);
+					handler.removeCallbacks(startPoll);
+				}
+				else {
+					response = httpClient.execute();
+				}
+				if (response != null
+						&& response.getStatusLine().getStatusCode() == 200) {
+					HttpEntity entity = response.getEntity();
+
+					if (entity != null) {
+						Poll poll = JSONHandler.parsePollResponseJSON(entity);
+						intent.putExtra("service", poll.getService());
+						intent.putExtra("item", poll.getItem());						
+						intent.putExtra("slide", poll.getSlide());
+						intent.putExtra("blank", poll.isBlankedDisplayed());
+						intent.putExtra("theme", poll.isThemeDisplayed());
+						intent.putExtra("desktop", poll.isDesktopDisplayed());
+						intent.putExtra("display", poll.isDisplayHidden());
+						intent.putExtra("inError", false);						
+						sendBroadcast(intent);
+						handler.postDelayed(this, delay);
+					}
+				}
+				else {
+					error = String.format("%s %s", getString(R.string.unable),
+							response);
+				}
+			}
+			catch (Exception e) {
+				error = String.format("%s: %s", e.getClass().getSimpleName(),
+						e.getMessage());
+			}
+			if (error != null && error.trim().length() > 0) {
+				Log.d(LOG_TAG, "HTTP request error " + error);
+				intent.putExtra("inError", true);						
+				sendBroadcast(intent);
+				handler.postDelayed(this, 1);
+				handler.removeCallbacks(startPoll);
+			}
+			/*
+			 * Stop once we have run the process.
+			 */
+			if (runOnce){
+				handler.removeCallbacks(startPoll);				
+			}
+		}
+	};
+
+	public void onDestroy() {
+		super.onDestroy();
+		Log.d(LOG_TAG, "onDestroy");
+		handler.removeCallbacks(startPoll);
+	}
+
+	private final String LOG_TAG = PingService.class.getName();
+}
\ No newline at end of file

=== modified file 'src/org/openlp/android/utility/JSONHandler.java'
--- src/org/openlp/android/utility/JSONHandler.java	2012-03-04 17:20:44 +0000
+++ src/org/openlp/android/utility/JSONHandler.java	2012-04-22 08:52:22 +0000
@@ -134,9 +134,15 @@
 
 			JSONObject jObject = new JSONObject(result);
 			JSONObject results = jObject.getJSONObject("results");
-			// JSONArray items = results.getJSONArray("slides");
 			Poll poll = new Poll();
 			poll.setSlide(results.getInt("slide"));
+			try {
+				poll.setService(results.getInt("service"));
+			}
+				catch (JSONException e) {
+					Log.d(LOG_TAG, "Missing service in JSON Openlp too Old");					
+					poll.setService(-1);					
+			}			
 			poll.setItem(results.getString("item"));
 			poll.setTwelveHourDisplay(results.getBoolean("twelve"));
 			poll.setBlankedDisplayed(results.getBoolean("blank"));

=== modified file 'src/org/openlp/android/utility/SlideAdapter.java'
--- src/org/openlp/android/utility/SlideAdapter.java	2012-03-04 17:20:44 +0000
+++ src/org/openlp/android/utility/SlideAdapter.java	2012-04-22 08:52:22 +0000
@@ -23,6 +23,7 @@
 import android.app.Activity;
 import android.content.Context;
 import android.content.SharedPreferences;
+import android.graphics.Typeface;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -39,30 +40,31 @@
 	Activity context;
 	LayoutInflater inflater;
 	boolean useTagDisplay = true;
-	private int[] colors = new int[]{0x74717000, 0x00000000};
+	private int[] colors = new int[] { 0x74717000, 0x00000000 };
+	private int currentSlide = -1;
 	SharedPreferences prefs;
 
-	public SlideAdapter(Activity context, List<SlideItem> items) {
+	public SlideAdapter(Activity context, List<SlideItem> items, int slide) {
 		this.context = context;
 		this.items = items;
+		this.currentSlide = slide;
 		inflater = context.getLayoutInflater();
 
 		prefs = context.getSharedPreferences(
-			context.getString(R.string.keySharedPreferences),
-			Context.MODE_PRIVATE);
-
+				context.getString(R.string.keySharedPreferences),
+				Context.MODE_PRIVATE);
 	}
 
 	public SlideAdapter(Activity context, List<SlideItem> items,
-		boolean useTagDisplay) {
+			boolean useTagDisplay) {
 		this.context = context;
 		this.items = items;
 		this.useTagDisplay = useTagDisplay;
 		inflater = context.getLayoutInflater();
 
 		prefs = context.getSharedPreferences(
-			context.getString(R.string.keySharedPreferences),
-			Context.MODE_PRIVATE);
+				context.getString(R.string.keySharedPreferences),
+				Context.MODE_PRIVATE);
 	}
 
 	@Override
@@ -86,6 +88,9 @@
 		View view = convertView;
 
 		SlideItem item = items.get(position);
+		
+		Log.d(LOG_TAG, "getView " + position + " " + item.getText() + " " 
+				+ this.currentSlide);		
 
 		if (view == null) {
 			view = inflater.inflate(R.layout.slide_list_item, null);
@@ -99,13 +104,10 @@
 		else {
 			holder = (ViewHolder) view.getTag();
 		}
-
-		Log.d(LOG_TAG, " " + context.getString(R.string.keyTextSize));
-
 		int size = Integer.parseInt(prefs.getString(
-			context.getString(R.string.keyTextSize),
-			String.valueOf(context.getResources().getInteger(
-				R.integer.textSizeDefaultValue))));
+				context.getString(R.string.keyTextSize),
+				String.valueOf(context.getResources().getInteger(
+						R.integer.textSizeDefaultValue))));
 
 		holder.rowMarker.setText(item.getTag());
 		holder.rowItem.setText(item.getText());
@@ -114,7 +116,14 @@
 		if (useTagDisplay) {
 			holder.rowMarker.setMinWidth(40);
 		}
-
+		if (position == this.currentSlide){
+			Log.d(LOG_TAG, "getView compare " + position + " "  
+					+ this.currentSlide);			
+			holder.rowItem.setTypeface(null, Typeface.BOLD);
+		}
+		else{
+			holder.rowItem.setTypeface(null, Typeface.NORMAL);			
+		}			
 		int colorPos = position % colors.length;
 		view.setBackgroundColor(colors[colorPos]);
 
@@ -125,6 +134,5 @@
 		TextView rowMarker;
 		TextView rowItem;
 	}
-
-	private final String LOG_TAG = SlideAdapter.class.getName();
+	private final String LOG_TAG = SlideAdapter.class.getName();	
 }

=== modified file 'src/org/openlp/android/utility/WebCallReturningAsyncTask.java'
--- src/org/openlp/android/utility/WebCallReturningAsyncTask.java	2012-03-04 17:20:44 +0000
+++ src/org/openlp/android/utility/WebCallReturningAsyncTask.java	2012-04-22 08:52:22 +0000
@@ -28,6 +28,7 @@
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
 import org.openlp.android.activity.Preferences;
+import org.openlp.android.utility.OpenLPHttpClient;
 
 import java.io.BufferedReader;
 import java.io.IOException;


Follow ups