rebase of android-generic, using git apply because rebase did not work
authorkenstir <kenstir@gmail.com>
Sat, 14 Nov 2015 02:52:03 +0000 (21:52 -0500)
committerkenstir <kenstir@gmail.com>
Sat, 14 Nov 2015 02:52:03 +0000 (21:52 -0500)
40 files changed:
Open-ILS/src/Android/core/res/layout/activity_choose_library.xml [new file with mode: 0644]
Open-ILS/src/Android/core/res/layout/activity_login.xml
Open-ILS/src/Android/core/res/layout/activity_splash.xml
Open-ILS/src/Android/core/res/values/ou.xml
Open-ILS/src/Android/core/res/values/strings.xml
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/AccountAccess.java
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/holds/PlaceHold.java
Open-ILS/src/Android/core/src/org/evergreen_ils/auth/AuthenticatorActivity.java
Open-ILS/src/Android/core/src/org/evergreen_ils/auth/EvergreenAuthenticator.java
Open-ILS/src/Android/core/src/org/evergreen_ils/barcodescan/CaptureActivity.java
Open-ILS/src/Android/core/src/org/evergreen_ils/globals/AppPrefs.java [new file with mode: 0644]
Open-ILS/src/Android/core/src/org/evergreen_ils/globals/GlobalConfigs.java
Open-ILS/src/Android/core/src/org/evergreen_ils/globals/Utils.java
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/Library.java [new file with mode: 0644]
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SearchCatalog.java
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/SearchCatalogListView.java
Open-ILS/src/Android/core/src/org/evergreen_ils/views/ApplicationPreferences.java [deleted file]
Open-ILS/src/Android/core/src/org/evergreen_ils/views/ChooseLibraryActivity.java [new file with mode: 0644]
Open-ILS/src/Android/core/src/org/evergreen_ils/views/UnusedPreferenceActivity.java [new file with mode: 0644]
Open-ILS/src/Android/core/src/org/evergreen_ils/views/splashscreen/LoadingTask.java
Open-ILS/src/Android/core/src/org/evergreen_ils/views/splashscreen/SplashActivity.java
Open-ILS/src/Android/cwmars_app/AndroidManifest.xml
Open-ILS/src/Android/cwmars_app/res/values/ou.xml
Open-ILS/src/Android/demo_app/AndroidManifest.xml
Open-ILS/src/Android/eg_app/.idea/.name [new file with mode: 0644]
Open-ILS/src/Android/eg_app/.idea/compiler.xml [new file with mode: 0644]
Open-ILS/src/Android/eg_app/.idea/copyright/profiles_settings.xml [new file with mode: 0644]
Open-ILS/src/Android/eg_app/.idea/encodings.xml [new file with mode: 0644]
Open-ILS/src/Android/eg_app/.idea/libraries/libs.xml [new file with mode: 0644]
Open-ILS/src/Android/eg_app/.idea/misc.xml [new file with mode: 0644]
Open-ILS/src/Android/eg_app/.idea/modules.xml [new file with mode: 0644]
Open-ILS/src/Android/eg_app/.idea/scopes/scope_settings.xml [new file with mode: 0644]
Open-ILS/src/Android/eg_app/.idea/uiDesigner.xml [new file with mode: 0644]
Open-ILS/src/Android/eg_app/.idea/vcs.xml [new file with mode: 0644]
Open-ILS/src/Android/eg_app/AndroidManifest.xml [new file with mode: 0644]
Open-ILS/src/Android/eg_app/eg_app.iml [new file with mode: 0644]
Open-ILS/src/Android/eg_app/res/values/ou.xml [new file with mode: 0644]
Open-ILS/src/Android/kenstir_parse_logcat.pl
Open-ILS/src/Android/support/v7/gridlayout/.classpath [deleted file]
Open-ILS/src/Android/support/v7/gridlayout/.project [deleted file]

diff --git a/Open-ILS/src/Android/core/res/layout/activity_choose_library.xml b/Open-ILS/src/Android/core/res/layout/activity_choose_library.xml
new file mode 100644 (file)
index 0000000..65c6256
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              android:orientation="vertical"
+              android:layout_width="match_parent"
+              android:layout_height="match_parent"
+              android:paddingTop="32dp"
+              android:paddingLeft="17dp"
+              android:paddingRight="17dp"
+        >
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/choose_library_message"
+        android:textAppearance="?android:attr/textAppearanceLarge" />
+    
+    <Spinner
+        android:id="@+id/choose_library_spinner"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="30dip"
+        android:layout_marginBottom="30dip"
+        />
+
+    <Button android:id="@+id/choose_library_button"
+              android:layout_width="wrap_content"
+              android:layout_height="wrap_content"
+              android:layout_gravity="right"
+              android:layout_marginTop="16dp"
+              android:text="@string/action_choose_library"
+              android:paddingLeft="32dp"
+              android:paddingRight="32dp"/>
+
+</LinearLayout>
+
index acb821d..bf9fb15 100644 (file)
@@ -9,7 +9,7 @@
         >
 
     <TextView
-        android:id="@+id/junkTextView"
+        android:id="@+id/account_sign_in_text"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="@string/ou_account_sign_in_message"
index 0fe10c2..4330cd8 100644 (file)
@@ -14,7 +14,7 @@
             android:layout_centerHorizontal="true"
             android:layout_marginTop="106dp"
             android:src="@drawable/evergreen_logo_sm072"
-            android:contentDescription="@string/ou_app_label" />
+            android:contentDescription="@string/ou_library_name" />
     
         <TextView
             android:id="@+id/action_in_progress"
index a722551..44cb1fd 100644 (file)
@@ -1,11 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <string name="ou_account_label">Evergreen Library</string>
-    <string name="ou_account_sign_in_message">Sign in to your\nEvergreen Library Account</string>
-    <!-- Each evergreen-derived app should have its own ou_account_type. This will enable
-         a user to have multiple evergreen-derived apps working simultaneously. -->
-    <string name="ou_account_type">org.evergreen_ils</string>
-    <string name="ou_app_label">Evergreen Library</string>
-    <string name="ou_app_name">Evergreen Library</string>
+    <!-- the label shown in the android account manager -->
+    <string name="ou_account_label">Example Library</string>
+    <!-- $1 in ou_account_sign_in_message will be replaced with the value of ou_account_label -->
+    <string name="ou_account_sign_in_message">Sign in to your\n%1$s account</string>
+    <!-- android account manager internal type.
+         Each evergreen-derived app must have its own unique ou_account_type. -->
+    <string name="ou_account_type">org.evergreen_ils.example</string>
+    <!-- app name used to launch app -->
+    <string name="ou_app_label">Evergreen</string>
+    <!-- library name displayed in the app bar -->
+    <string name="ou_library_name">EXAMPLE</string>
+    <!-- OPAC URL -->
     <string name="ou_library_url">https://demo.evergreencatalog.com</string>
 </resources>
index 7ac9682..fb18d6e 100644 (file)
 
     <string name="action_settings">Settings</string>
     <string name="retry_label">Retry</string>
+    <string name="choose_library_message">Select your Library</string>
+    <string name="action_choose_library">Select</string>
 
 </resources>
index 0cc1683..7f2319c 100644 (file)
@@ -150,7 +150,7 @@ public class AccountAccess {
     private String httpAddress = "http://ulysses.calvin.edu";
 
     /** The TAG. */
-    private final String TAG = AccountAccess.class.getName();
+    private final String TAG = AccountAccess.class.getSimpleName();
 
     /**
      * The auth token. Sent with every request that needs authentication
index 65df3b4..54b8eeb 100644 (file)
@@ -328,7 +328,7 @@ public class PlaceHold extends ActionBarActivity {
             }
         });
 
-        // kcxxx: factor this out
+        // kenstir todo: factor this out
         int homeLibrary = 0;
         if (AccountAccess.getAccountAccess() != null) {
             homeLibrary = AccountAccess.getAccountAccess().getHomeLibraryID();
index f43042a..3f46d44 100644 (file)
@@ -18,6 +18,7 @@ import android.util.Log;
 import android.view.ContextThemeWrapper;
 import android.view.View;
 import android.widget.TextView;
+import org.evergreen_ils.globals.AppPrefs;
 
 public class AuthenticatorActivity extends AccountAuthenticatorActivity {
 
@@ -46,8 +47,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_login);
 
-        // make sure default values are set up for preferences
-        PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
+        AppPrefs.init(this);
 
         accountManager = AccountManager.get(getBaseContext());
 
@@ -58,6 +58,9 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
             authTokenType = Const.AUTHTOKEN_TYPE;
         Log.d(TAG, "onCreate> authTokenType="+authTokenType);
 
+        TextView signInText = (TextView) findViewById(R.id.account_sign_in_text);
+        signInText.setText(String.format(getString(R.string.ou_account_sign_in_message),
+                AppPrefs.getString(AppPrefs.LIBRARY_NAME)));
         if (accountName != null) {
             ((TextView) findViewById(R.id.accountName)).setText(accountName);
         }
@@ -69,17 +72,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
                         submit();
                     }
                 });
-        /*
-         * findViewById(R.id.signUp).setOnClickListener(new
-         * View.OnClickListener() {
-         * 
-         * @Override public void onClick(View v) { // Since there can only be
-         * one AuthenticatorActivity, we call the sign up activity, get his
-         * results, // and return them in setAccountAuthenticatorResult(). See
-         * finishLogin(). Intent signup = new Intent(getBaseContext(),
-         * SignUpActivity.class); signup.putExtras(getIntent().getExtras());
-         * startActivityForResult(signup, REQ_SIGNUP); } });
-         */
+
         if (savedInstanceState != null) {
             Log.d(TAG, "onCreate> savedInstanceState="+savedInstanceState);
             if (savedInstanceState.getString(STATE_ALERT_MESSAGE) != null) {
index 0e32462..ddbb22c 100644 (file)
@@ -7,6 +7,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import android.preference.PreferenceManager;
+import org.evergreen_ils.globals.AppPrefs;
 import org.opensrf.Method;
 import org.opensrf.net.http.GatewayRequest;
 import org.opensrf.net.http.HttpConnection;
@@ -74,10 +75,9 @@ public class EvergreenAuthenticator {
     public static String signIn(Context context, String username, String password) throws AuthenticationException {
         Log.d(TAG, "signIn> "+username);
 
-        final String library_url = context.getString(R.string.ou_library_url);
         HttpConnection conn;
         try {
-            conn = new HttpConnection(library_url + "/osrf-gateway-v1");
+            conn = new HttpConnection(AppPrefs.getString(AppPrefs.LIBRARY_URL) + "/osrf-gateway-v1");
         } catch (MalformedURLException e) {
             throw new AuthenticationException(e);
         }
@@ -107,6 +107,7 @@ public class EvergreenAuthenticator {
             Log.d(TAG, "authtoken: " + authtoken);
             Integer authtime = ((Map<String, Integer>) payload).get("authtime");
             Log.d(TAG, "authtime: " + authtime);
+            AppPrefs.setBoolean(AppPrefs.EVER_LOGGED_IN, true);
             return authtoken;
         } else if (textcode.equals("LOGIN_FAILED")) {
             String desc = ((Map<String, String>) resp).get("desc");
index 8516c3e..868e53d 100755 (executable)
@@ -156,7 +156,7 @@ public class CaptureActivity extends Activity implements SurfaceHolder.Callback
 
        private void displayFrameworkBugMessageAndExit(String info) {
                AlertDialog.Builder builder = new AlertDialog.Builder(this);
-               builder.setTitle(getString(R.string.ou_app_name));
+               builder.setTitle(getString(R.string.ou_library_name));
                builder.setMessage("[" + info + "] "
                                + getString(R.string.msg_camera_framework_bug));
                builder.setPositiveButton(R.string.button_ok, new FinishListener(this));
diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/globals/AppPrefs.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/globals/AppPrefs.java
new file mode 100644 (file)
index 0000000..fa28a7f
--- /dev/null
@@ -0,0 +1,71 @@
+package org.evergreen_ils.globals;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.preference.PreferenceManager;
+import android.util.Log;
+import org.evergreen_ils.R;
+import org.evergreen_ils.accountAccess.bookbags.BookBag;
+
+/**
+ * Created by kenstir on 11/8/2015.
+ */
+public class AppPrefs {
+    public static final String EVER_LOGGED_IN = "ever_logged_in";
+    public static final String LIBRARY_URL = "library_url";
+    public static final String LIBRARY_NAME = "library_name";
+    private static final String VERSION = "version";
+    // increment PREFS_VERSION every time you make a change to the persistent pref storage
+    private static final int PREFS_VERSION = 2;
+    private static final String TAG = AppPrefs.class.getSimpleName();
+    private static Context context;
+    private static boolean initialized;
+
+    public static void init(Context app_context) {
+        if (initialized)
+            return;
+
+        context = app_context;
+        initialized = true;
+
+        // set default values unless already set
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+        int version = prefs.getInt(VERSION, 0);
+        if (version < PREFS_VERSION) {
+            SharedPreferences.Editor editor = prefs.edit();
+            version = PREFS_VERSION;
+            editor.putInt(VERSION, PREFS_VERSION);
+            editor.putBoolean(EVER_LOGGED_IN, false);
+            editor.putString(LIBRARY_URL, context.getString(R.string.ou_library_url));
+            editor.putString(LIBRARY_NAME, context.getString(R.string.ou_library_name));
+            editor.commit();
+        }
+        Log.d(TAG, "version=" + version);
+        Log.d(TAG, "library_url=" + getString(LIBRARY_URL));
+        Log.d(TAG, "library_name=" + getString(LIBRARY_NAME));
+    }
+
+    public static String getString(String key) {
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+        return prefs.getString(key, null);
+    }
+
+    public static boolean getBoolean(String key) {
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+        return prefs.getBoolean(key, false);
+    }
+
+    public static void setString(String key, String value) {
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+        SharedPreferences.Editor editor = prefs.edit();
+        editor.putString(key, value);
+        editor.commit();
+    }
+
+    public static void setBoolean(String key, boolean value) {
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+        SharedPreferences.Editor editor = prefs.edit();
+        editor.putBoolean(key, value);
+        editor.commit();
+    }
+}
index ddc1fdc..a43a691 100644 (file)
@@ -205,11 +205,6 @@ public class GlobalConfigs {
                     return a.name.compareTo(b.name);
                 }
             });
-            /*
-            for (int i=0; i<organisations.size(); ++i) {
-                Log.d(TAG, "getOrg postsort org["+i+"]= id:"+organisations.get(i).id+" parent:"+organisations.get(i).parent+" name:"+organisations.get(i).name);
-            }
-            */
 
             long duration_ms = System.currentTimeMillis() - start_ms;
             Log.d("init", "Loading organisations took "+duration_ms+"ms");
index 0126c16..46b9fc2 100644 (file)
@@ -170,7 +170,7 @@ public class Utils {
     }
 
     // alternate version of doRequest
-    // kcxxx: not sure why this one loops calling req.recv and the other doesn't
+    // kenstir todo: not sure why this one loops calling req.recv and the other doesn't
     public static Object doRequest(HttpConnection conn, String service,
                                    String methodName, Object[] params) {
 
diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/Library.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/Library.java
new file mode 100644 (file)
index 0000000..ef0f5a9
--- /dev/null
@@ -0,0 +1,17 @@
+package org.evergreen_ils.searchCatalog;
+
+import android.text.TextUtils;
+
+/** value class
+ * Created by kenstir on 11/5/2015.
+ */
+public class Library {
+    public String url;            // e.g. "https://catalog.cwmars.org"
+    public String short_name;     // e.g. "C/W MARS"
+    public String directory_name; // e.g. "Massachusetts, US (C/W MARS)"
+    public Library(String url, String short_name, String directory_name) {
+        this.url = url;
+        this.short_name = short_name;
+        this.directory_name = directory_name;
+    }
+}
index d4cc928..53fcd8a 100644 (file)
@@ -27,6 +27,7 @@ import java.util.Map;
 
 import android.text.TextUtils;
 import org.evergreen_ils.accountAccess.AccountAccess;
+import org.evergreen_ils.globals.AppPrefs;
 import org.evergreen_ils.globals.GlobalConfigs;
 import org.evergreen_ils.globals.Utils;
 import org.opensrf.Method;
@@ -131,16 +132,11 @@ public class SearchCatalog {
 
         try {
             // configure the connection
-            conn = new HttpConnection(GlobalConfigs.httpAddress
-                    + "/osrf-gateway-v1");
+            conn = new HttpConnection(AppPrefs.getString(AppPrefs.LIBRARY_URL) + "/osrf-gateway-v1");
 
         } catch (Exception e) {
-            System.err.println("Exception in establishing connection "
-                    + e.getMessage());
+            Log.d(TAG, "error", e);
         }
-        // registering classes so no longer necessary to register object classes
-        // manually
-
     }
 
     /**
index c5a996f..47403c2 100644 (file)
@@ -426,7 +426,7 @@ public class SearchCatalogListView extends ActionBarActivity {
             }
         });
 
-        //kcxxx: factor this out
+        //kenstir todo: factor this out
         int selectedOrgPos = 0;
         int homeLibrary = 0;
         if (AccountAccess.getAccountAccess() != null) {
diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/views/ApplicationPreferences.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/views/ApplicationPreferences.java
deleted file mode 100644 (file)
index 3b0ed13..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (C) 2012 Evergreen Open-ILS
- * @author Daniel-Octavian Rizea
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * or the License, or (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be usefull,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software 
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- * 
- */
-package org.evergreen_ils.views;
-
-import java.util.Calendar;
-
-import org.evergreen_ils.R;
-import org.evergreen_ils.globals.GlobalConfigs;
-import org.evergreen_ils.services.NotificationAlert;
-import org.evergreen_ils.services.PeriodicServiceBroadcastReceiver;
-import org.evergreen_ils.services.ScheduledIntentService;
-import org.evergreen_ils.auth.Const;
-
-import android.app.AlarmManager;
-import android.app.PendingIntent;
-import android.app.ProgressDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
-import android.net.ConnectivityManager;
-import android.os.Bundle;
-import android.preference.PreferenceActivity;
-import android.preference.PreferenceManager;
-import android.provider.Settings;
-import android.widget.Toast;
-
-public class ApplicationPreferences extends PreferenceActivity implements
-        OnSharedPreferenceChangeListener {
-
-    private final String TAG = ApplicationPreferences.class.getName();
-
-    private ProgressDialog progressDialog;
-
-    private ApplicationPreferences reference;
-
-    private Context context;
-
-    private Thread coreFilesDownload = null;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-
-        super.onCreate(savedInstanceState);
-
-        addPreferencesFromResource(R.xml.preferences);
-
-        context = this;
-        reference = this;
-        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
-        prefs.registerOnSharedPreferenceChangeListener(this);
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-        reference = this;
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        reference = null;
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-        reference = null;
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        reference = null;
-    }
-
-    @Override
-    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
-            String key) {
-
-        boolean httpAddressChange = false;
-
-        boolean checkConnection = false;
-
-        if (key.equals("notifications_enabled")) {
-
-            if (sharedPreferences.getBoolean("notifications_enabled", false)) {
-
-                Toast.makeText(context, "Set up notification updates",
-                        Toast.LENGTH_SHORT).show();
-                // if enabled register the update service to run once per day
-                // get a Calendar object with current time
-                Calendar cal = Calendar.getInstance();
-
-                Intent bRecvIntent = new Intent(this,
-                        PeriodicServiceBroadcastReceiver.class);
-                bRecvIntent.setAction(ScheduledIntentService.ACTION);
-                // update the current intent if it exists
-                PendingIntent sender = PendingIntent.getBroadcast(this,
-                        NotificationAlert.NOTIFICATION_INTENT
-                                + PeriodicServiceBroadcastReceiver.INTENT_ID,
-                        bRecvIntent, PendingIntent.FLAG_UPDATE_CURRENT);
-
-                // Get the AlarmManager service
-                AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
-                am.setRepeating(AlarmManager.RTC, cal.getTimeInMillis(),
-                        10000 * ScheduledIntentService.SCHEDULE_TIME_INTERVAL,
-                        sender);
-            } else {
-                Toast.makeText(context, "Disable notification updates",
-                        Toast.LENGTH_SHORT).show();
-                // cancel the service
-
-                Intent bRecvIntent = new Intent(this,
-                        PeriodicServiceBroadcastReceiver.class);
-
-                // update the current intent if it exists
-                PendingIntent sender = PendingIntent.getBroadcast(this,
-                        NotificationAlert.NOTIFICATION_INTENT
-                                + PeriodicServiceBroadcastReceiver.INTENT_ID,
-                        bRecvIntent, PendingIntent.FLAG_UPDATE_CURRENT);
-
-                // Get the AlarmManager service
-                AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
-                // cancel the service
-                am.cancel(sender);
-            }
-        }
-    }
-
-}
diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/views/ChooseLibraryActivity.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/views/ChooseLibraryActivity.java
new file mode 100644 (file)
index 0000000..bac7f18
--- /dev/null
@@ -0,0 +1,170 @@
+package org.evergreen_ils.views;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.Spinner;
+import org.evergreen_ils.R;
+import org.evergreen_ils.globals.AppPrefs;
+import org.evergreen_ils.globals.GlobalConfigs;
+import org.evergreen_ils.globals.Utils;
+import org.evergreen_ils.searchCatalog.Library;
+import org.evergreen_ils.views.splashscreen.SplashActivity;
+import org.opensrf.util.JSONException;
+import org.opensrf.util.JSONReader;
+
+import java.util.*;
+
+/**
+ * Created by kenstir on 2015-11-05.
+ */
+public class ChooseLibraryActivity extends ActionBarActivity {
+
+    public final static int CHOOSE_LIBRARY_REQUEST = 0;
+    private final String TAG = ChooseLibraryActivity.class.getSimpleName();
+    public static String librariesJSONUrl = "http://evergreen-ils.org/testing/libraries.json";
+    Context context;
+    Spinner consortiumSpinner;
+    Library selected_library = null;
+    List<Library> libraries = new ArrayList<Library>();
+    private boolean restarted = false;
+
+    private class FetchConsortiumsTask extends AsyncTask<String, Integer, String> {
+        protected String doInBackground(String... params) {
+            String url = params[0];
+            String result = null;
+            try {
+                Log.d(TAG, "fetching "+url);
+                result = Utils.getNetPageContent(url);
+            } catch (Exception e) {
+                Log.d(TAG, "error fetching", e);
+            }
+            return result;
+        }
+
+        protected void onPostExecute(String result) {
+            Log.d(TAG, "results available: "+result);
+            parseLibrariesJSON(result);
+            ArrayList<String> l = new ArrayList<String>(libraries.size());
+            for (Library library : libraries) {
+                l.add(library.directory_name);
+            }
+            ArrayAdapter<String> adapter = new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, l);
+            consortiumSpinner.setAdapter(adapter);
+        }
+    }
+
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        context = getApplicationContext();
+
+        setContentView(R.layout.activity_choose_library);
+
+        AppPrefs.init(getApplicationContext());
+
+        ActionBar actionBar = getSupportActionBar();
+
+        consortiumSpinner = (Spinner) findViewById(R.id.choose_library_spinner);
+        consortiumSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                selected_library = libraries.get(position);
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+                selected_library = null;
+            }
+        });
+        ((Button)findViewById(R.id.choose_library_button)).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                selectLibrary();
+            }
+        });
+    }
+
+    private void selectLibrary() {
+        if (selected_library != null) {
+            Log.d(TAG, "selected library " + selected_library.directory_name);
+            AppPrefs.setString(AppPrefs.LIBRARY_URL, selected_library.url);
+            AppPrefs.setString(AppPrefs.LIBRARY_NAME, selected_library.short_name);
+
+            startSplashActivity();
+        }
+    }
+
+    private void startSplashActivity() {
+        // This is different from SplashActivity.restartApp(this) in that it does not clear the back stack.
+        // This is so that a user can back up and choose a different library.
+        Intent i = new Intent(this, SplashActivity.class);
+        startActivity(i);
+    }
+
+    @Override
+    protected void onStart() {
+        super.onStart();
+        GlobalConfigs.httpAddress = AppPrefs.getString(AppPrefs.LIBRARY_URL);// kenstir todo: replace all refs to GlobalConfigs.httpAddress
+        Log.d(TAG, "kcxxx: onstart: url=" + GlobalConfigs.httpAddress);
+        if (!TextUtils.isEmpty(GlobalConfigs.httpAddress) && !restarted) {
+            startSplashActivity();
+        } else {
+            startTask();
+        }
+    }
+
+    @Override
+    protected void onRestart() {
+        super.onRestart();
+        restarted = true;
+        Log.d(TAG, "kcxxx: onrestart");
+    }
+
+    private void startTask() {
+        new FetchConsortiumsTask().execute(librariesJSONUrl);
+    }
+
+    private void parseLibrariesJSON(String json) {
+        libraries.clear();
+
+        if (json != null) {
+            List<Map<String,?>> l;
+            try {
+                l = (List<Map<String,?>>) new JSONReader(json).readArray();
+            } catch (JSONException e) {
+                Log.d(TAG, "failed parsing libraries array", e);
+                return;
+            }
+            for (Map<String, ?> map : l) {
+                String url = (String) map.get("url");
+                String directory_name = (String) map.get("directory_name");
+                String short_name = (String) map.get("short_name");
+                Library library = new Library(url, short_name, directory_name);
+                libraries.add(library);
+            }
+
+            Collections.sort(libraries, new Comparator<Library>() {
+                @Override
+                public int compare(Library a, Library b) {
+                    return a.directory_name.compareTo(b.directory_name);
+                }
+            });
+
+            for (int i = 0; i< libraries.size(); ++i) {
+                Log.d(TAG, "c["+i+"]: "+ libraries.get(i).directory_name);
+            }
+        }
+    }
+
+}
diff --git a/Open-ILS/src/Android/core/src/org/evergreen_ils/views/UnusedPreferenceActivity.java b/Open-ILS/src/Android/core/src/org/evergreen_ils/views/UnusedPreferenceActivity.java
new file mode 100644 (file)
index 0000000..0ec67c6
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2012 Evergreen Open-ILS
+ * @author Daniel-Octavian Rizea
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * or the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be usefull,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ * 
+ */
+package org.evergreen_ils.views;
+
+import java.util.Calendar;
+
+import org.evergreen_ils.R;
+import org.evergreen_ils.services.NotificationAlert;
+import org.evergreen_ils.services.PeriodicServiceBroadcastReceiver;
+import org.evergreen_ils.services.ScheduledIntentService;
+
+import android.app.AlarmManager;
+import android.app.PendingIntent;
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
+import android.os.Bundle;
+import android.preference.PreferenceActivity;
+import android.preference.PreferenceManager;
+import android.widget.Toast;
+
+public class UnusedPreferenceActivity extends PreferenceActivity implements
+        OnSharedPreferenceChangeListener {
+
+    private final String TAG = UnusedPreferenceActivity.class.getSimpleName();
+
+    private ProgressDialog progressDialog;
+
+    private UnusedPreferenceActivity reference;
+
+    private Context context;
+
+    private Thread coreFilesDownload = null;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+
+        super.onCreate(savedInstanceState);
+
+        addPreferencesFromResource(R.xml.preferences);
+
+        context = this;
+        reference = this;
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+        prefs.registerOnSharedPreferenceChangeListener(this);
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        reference = this;
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        reference = null;
+    }
+
+    @Override
+    protected void onStop() {
+        super.onStop();
+        reference = null;
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        reference = null;
+    }
+
+    @Override
+    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
+            String key) {
+
+        boolean httpAddressChange = false;
+
+        boolean checkConnection = false;
+
+        if (key.equals("notifications_enabled")) {
+
+            if (sharedPreferences.getBoolean("notifications_enabled", false)) {
+
+                Toast.makeText(context, "Set up notification updates",
+                        Toast.LENGTH_SHORT).show();
+                // if enabled register the update service to run once per day
+                // get a Calendar object with current time
+                Calendar cal = Calendar.getInstance();
+
+                Intent bRecvIntent = new Intent(this,
+                        PeriodicServiceBroadcastReceiver.class);
+                bRecvIntent.setAction(ScheduledIntentService.ACTION);
+                // update the current intent if it exists
+                PendingIntent sender = PendingIntent.getBroadcast(this,
+                        NotificationAlert.NOTIFICATION_INTENT
+                                + PeriodicServiceBroadcastReceiver.INTENT_ID,
+                        bRecvIntent, PendingIntent.FLAG_UPDATE_CURRENT);
+
+                // Get the AlarmManager service
+                AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
+                am.setRepeating(AlarmManager.RTC, cal.getTimeInMillis(),
+                        10000 * ScheduledIntentService.SCHEDULE_TIME_INTERVAL,
+                        sender);
+            } else {
+                Toast.makeText(context, "Disable notification updates",
+                        Toast.LENGTH_SHORT).show();
+                // cancel the service
+
+                Intent bRecvIntent = new Intent(this,
+                        PeriodicServiceBroadcastReceiver.class);
+
+                // update the current intent if it exists
+                PendingIntent sender = PendingIntent.getBroadcast(this,
+                        NotificationAlert.NOTIFICATION_INTENT
+                                + PeriodicServiceBroadcastReceiver.INTENT_ID,
+                        bRecvIntent, PendingIntent.FLAG_UPDATE_CURRENT);
+
+                // Get the AlarmManager service
+                AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
+                // cancel the service
+                am.cancel(sender);
+            }
+        }
+    }
+
+}
index 74d4420..ab4982f 100644 (file)
@@ -40,7 +40,7 @@ import android.util.Log;
  *
  */
 public class LoadingTask {
-    private final String TAG = LoadingTask.class.getName();
+    private final String TAG = LoadingTask.class.getSimpleName();
     
     public static final String TASK_OK = "OK";
 
index 18e232e..ac41b62 100644 (file)
  */
 package org.evergreen_ils.views.splashscreen;
 
-import android.os.Build;
+import android.content.SharedPreferences;
 import org.evergreen_ils.R;
 import org.evergreen_ils.globals.GlobalConfigs;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.ApplicationPreferences;
+import org.evergreen_ils.globals.AppPrefs;
 import org.evergreen_ils.views.MainActivity;
 import org.evergreen_ils.views.splashscreen.LoadingTask.LoadingTaskListener;
 
@@ -32,7 +31,6 @@ import android.app.AlertDialog;
 import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
-import android.preference.PreferenceManager;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.View;
@@ -43,7 +41,8 @@ import android.widget.TextView;
 
 public class SplashActivity extends Activity implements LoadingTaskListener {
 
-    private static String TAG = "SplashActivity";
+    public final static int REQUEST_SELECT_LIBRARY = 0;
+    private static String TAG = SplashActivity.class.getSimpleName();
     private TextView mProgressText;
     private Context mContext;
     private ProgressBar mProgressBar;
@@ -51,86 +50,100 @@ public class SplashActivity extends Activity implements LoadingTaskListener {
     private Button mRetryButton;
     private LoadingTask mTask;
     private static boolean mInitialized;
+    private boolean restarted = false;
 
-    public static boolean isAppInitialized()
-    {
+    public static boolean isAppInitialized() {
         return mInitialized;
     }
 
-    /** android may choose to initialize the app at a non-MAIN activity if the
+    /**
+     * android may choose to initialize the app at a non-MAIN activity if the
      * app crashed or for other reasons.  In these cases we want to force sane
      * initialization via the SplashActivity.
-     * 
+     * <p/>
      * used in all activity class's onCreate() like so:
      * <code>
      * if (!SplashActivity.isInitialized) {
-     *     SplashActivity.restartApp(this);
-     *     return;
+     * SplashActivity.restartApp(this);
+     * return;
      * }
      * </code>
-     * 
+     *
      * @param a
      */
-       public static void restartApp(Activity a)
-    {
-               Log.d(TAG, "restartApp> Restarting SplashActivity");
-               final Intent i = new Intent(a, SplashActivity.class);
-               i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
-               a.startActivity(i);
-               a.finish();
-       }
+    public static void restartApp(Activity a) {
+        Log.d(TAG, "restartApp> Restarting SplashActivity");
+        Intent i = new Intent(a, SplashActivity.class);
+        i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+        a.startActivity(i);
+        a.finish();
+    }
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
+        Log.d(TAG, "kcxxx: oncreate");
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_splash);
 
         this.mContext = this;
+        setContentView(R.layout.activity_splash);
 
-        // make sure default values are set up for preferences
-        PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
+        AppPrefs.init(getApplicationContext());
 
         mProgressText = (TextView) findViewById(R.id.action_in_progress);
         mProgressBar = (ProgressBar) findViewById(R.id.activity_splash_progress_bar);
         mRetryButton = (Button) findViewById(R.id.activity_splash_retry_button);
-        Log.d(TAG, "onCreate>");
         mRetryButton.setOnClickListener(new OnClickListener() {
             @Override
             public void onClick(View v) {
                 startTask();
             }
         });
-
-        /* this didn't work, but the progress bar is weird on GB 2.2,
-           and it's lopsided in landscape mode on GB 2.3.7
-        int currentApiVersion = android.os.Build.VERSION.SDK_INT;
-        if (currentApiVersion < Build.VERSION_CODES.HONEYCOMB)
-            mProgressBar.setScrollBarStyle(android.R.attr.progressBarStyleHorizontal);
-         */
-
-        GlobalConfigs.httpAddress = getString(R.string.ou_library_url);
-        startTask();
     }
-    
+
     protected void startTask() {
-        Log.d(TAG, "startTask> task="+mTask);
+        Log.d(TAG, "startTask> task=" + mTask);
         if (mTask != null)
             return;
         mTask = new LoadingTask(this, this);
         mTask.execute();
     }
-    
+
+    @Override
+    protected void onStart() {
+        super.onStart();
+        GlobalConfigs.httpAddress = AppPrefs.getString(AppPrefs.LIBRARY_URL);// kenstir todo: replace all refs to GlobalConfigs.httpAddress
+        boolean ever_logged_in = AppPrefs.getBoolean(AppPrefs.EVER_LOGGED_IN);
+        Log.d(TAG, "kcxxx: onstart: url=" + GlobalConfigs.httpAddress + " ever_logged_in=" + ever_logged_in);
+        if (!TextUtils.isEmpty(GlobalConfigs.httpAddress) && ever_logged_in && !restarted) {
+            startTask();
+        }
+    }
+
+    @Override
+    protected void onRestart() {
+        super.onRestart();
+        restarted = true;
+        Log.d(TAG, "kcxxx: onrestart");
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        Log.d(TAG, "kcxxx: onresume");
+    }
+
     @Override
     protected void onStop() {
         super.onStop();
-        if(mAlertDialog != null) {
+        Log.d(TAG, "kcxxx: onstop");
+        if (mAlertDialog != null) {
             mAlertDialog.dismiss();
         }
     }
-    
+
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        Log.d(TAG, "onActivityResult> "+requestCode+" "+resultCode);
+        Log.d(TAG, "kcxxx: onactivityresult: " + requestCode + " " + resultCode);
     }
 
     private void startApp() {
@@ -148,13 +161,13 @@ public class SplashActivity extends Activity implements LoadingTaskListener {
 
     @Override
     public void onProgressUpdate(String value) {
-        Log.d(TAG, "onProgressUpdate> "+value);
+        Log.d(TAG, "onProgressUpdate> " + value);
         mProgressText.setText(value);
     }
 
     @Override
     public void onPostExecute(String result) {
-        Log.d(TAG, "onPostExecute> "+result);
+        Log.d(TAG, "onPostExecute> " + result);
         mTask = null;
         Log.d(TAG, "progressbar...gone");
         mProgressBar.setVisibility(View.GONE);
@@ -167,10 +180,10 @@ public class SplashActivity extends Activity implements LoadingTaskListener {
                 extra_text = "...Failed:\n" + result;
             else
                 extra_text = "...Cancelled";
-            Log.d(TAG, "progresstext += "+extra_text);
+            Log.d(TAG, "progresstext += " + extra_text);
             mProgressText.setText(mProgressText.getText() + extra_text);
             Log.d(TAG, "retrybutton...visible");
             mRetryButton.setVisibility(View.VISIBLE);
         }
     }
-}
+}
\ No newline at end of file
index d332b8b..871d8cd 100644 (file)
@@ -16,6 +16,7 @@
     <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
     <uses-permission android:name="android.permission.USE_CREDENTIALS" />
 
+    <!-- uses-feature elements are used in Play Store device matching -->
     <uses-feature android:name="android.hardware.screen.landscape" android:required="false" />
     <uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
     <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
@@ -23,7 +24,7 @@
     <application
         android:allowBackup="true"
         android:icon="@drawable/evergreen_launcher_icon"
-        android:label="@string/ou_app_label"
+        android:label="@string/ou_library_name"
         android:theme="@style/Theme.AppCompat" >
 
         <!-- Notification receiver -->
@@ -58,7 +59,7 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        <activity android:name="org.evergreen_ils.views.ApplicationPreferences" >
+        <activity android:name="org.evergreen_ils.views.UnusedPreferenceActivity" >
         </activity>
 
         <!-- Search -->
index 6dc1c40..4aac9db 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- ou.xml - C/W MARS organizational unit -->
 <resources>
+    <!-- see ../core/res/values/ou.xml for a description -->
     <string name="ou_account_label">C/W MARS Library</string>
-    <string name="ou_account_sign_in_message">Sign in to your\nC/W MARS Library Account</string>
+    <string name="ou_account_sign_in_message">Sign in to your\n%1$s account</string>
     <string name="ou_account_type">org.cwmars</string>
     <string name="ou_app_label">C/W MARS</string>
-    <string name="ou_app_name">C/W MARS</string>
+    <string name="ou_library_name">C/W MARS</string>
     <string name="ou_library_url">https://bark.cwmars.org</string>
 </resources>
index c78446f..d497a19 100644 (file)
@@ -1,28 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.evergreencatalog.demo"
+          package="org.evergreen_ils.demo_app"xyzzy-think-about-this
           android:installLocation="auto"
           android:versionCode="1"
           android:versionName="1.0">
 
     <uses-sdk
-        android:minSdkVersion="8"
-        android:targetSdkVersion="18" />
+        android:minSdkVersion="10"
+        android:targetSdkVersion="19" />
 
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
-    <uses-permission android:name="android.permission.CAMERA" />
-    <uses-permission android:name="android.permission.FLASHLIGHT" />
     <uses-permission android:name="android.permission.GET_ACCOUNTS" />
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
-    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
     <uses-permission android:name="android.permission.USE_CREDENTIALS" />
-    <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.WAKE_LOCK" />
 
-    <uses-feature android:name="android.hardware.camera" />
-    <uses-feature android:name="android.hardware.camera.autofocus" />
+    <uses-feature android:name="android.hardware.screen.landscape" android:required="false" />
+    <uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
+    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
 
     <application
         android:allowBackup="true"
@@ -36,6 +32,7 @@
                 android:process=":remote">
         </receiver>
         <!-- Receiver to reinit notifications on reboot -->
+        <!--
         <receiver android:name="org.evergreen_ils.services.RebootReceiver">
             <intent-filter>
                 <action android:name="android.intent.action.BOOT_COMPLETED"/>
                 <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
             </intent-filter>
         </receiver>
+        -->
 
+        <!--
         <service android:name="org.evergreen_ils.services.ScheduledIntentService">
         </service>
+        -->
 
         <activity
                 android:name="org.evergreen_ils.views.splashscreen.SplashActivity"
diff --git a/Open-ILS/src/Android/eg_app/.idea/.name b/Open-ILS/src/Android/eg_app/.idea/.name
new file mode 100644 (file)
index 0000000..58c087e
--- /dev/null
@@ -0,0 +1 @@
+eg_app
\ No newline at end of file
diff --git a/Open-ILS/src/Android/eg_app/.idea/compiler.xml b/Open-ILS/src/Android/eg_app/.idea/compiler.xml
new file mode 100644 (file)
index 0000000..217af47
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <option name="DEFAULT_COMPILER" value="Javac" />
+    <resourceExtensions />
+    <wildcardResourcePatterns>
+      <entry name="!?*.java" />
+      <entry name="!?*.form" />
+      <entry name="!?*.class" />
+      <entry name="!?*.groovy" />
+      <entry name="!?*.scala" />
+      <entry name="!?*.flex" />
+      <entry name="!?*.kt" />
+      <entry name="!?*.clj" />
+    </wildcardResourcePatterns>
+    <annotationProcessing>
+      <profile default="true" name="Default" enabled="false">
+        <processorPath useClasspath="true" />
+      </profile>
+    </annotationProcessing>
+  </component>
+</project>
+
diff --git a/Open-ILS/src/Android/eg_app/.idea/copyright/profiles_settings.xml b/Open-ILS/src/Android/eg_app/.idea/copyright/profiles_settings.xml
new file mode 100644 (file)
index 0000000..e7bedf3
--- /dev/null
@@ -0,0 +1,3 @@
+<component name="CopyrightManager">
+  <settings default="" />
+</component>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/eg_app/.idea/encodings.xml b/Open-ILS/src/Android/eg_app/.idea/encodings.xml
new file mode 100644 (file)
index 0000000..f758959
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false">
+    <file url="PROJECT" charset="UTF-8" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/eg_app/.idea/libraries/libs.xml b/Open-ILS/src/Android/eg_app/.idea/libraries/libs.xml
new file mode 100644 (file)
index 0000000..2c6670d
--- /dev/null
@@ -0,0 +1,11 @@
+<component name="libraryTable">
+  <library name="libs">
+    <CLASSES>
+      <root url="jar://$PROJECT_DIR$/../core/libs/zxing_barcode.jar!/" />
+      <root url="jar://$PROJECT_DIR$/../core/libs/androwrapee-1.1.0.jar!/" />
+      <root url="jar://$PROJECT_DIR$/../core/libs/opensrf2_android.jar!/" />
+    </CLASSES>
+    <JAVADOC />
+    <SOURCES />
+  </library>
+</component>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/eg_app/.idea/misc.xml b/Open-ILS/src/Android/eg_app/.idea/misc.xml
new file mode 100644 (file)
index 0000000..4fa8d45
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="EntryPointsManager">
+    <entry_points version="2.0" />
+  </component>
+  <component name="NullableNotNullManager">
+    <option name="myDefaultNullable" value="android.support.annotation.Nullable" />
+    <option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
+    <option name="myNullables">
+      <value>
+        <list size="4">
+          <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
+          <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
+          <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
+          <item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
+        </list>
+      </value>
+    </option>
+    <option name="myNotNulls">
+      <value>
+        <list size="4">
+          <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
+          <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
+          <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
+          <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
+        </list>
+      </value>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="Android API 19 Platform" project-jdk-type="Android SDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/eg_app/.idea/modules.xml b/Open-ILS/src/Android/eg_app/.idea/modules.xml
new file mode 100644 (file)
index 0000000..2552281
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/../support/v7/appcompat/appcompat.iml" filepath="$PROJECT_DIR$/../support/v7/appcompat/appcompat.iml" />
+      <module fileurl="file://$PROJECT_DIR$/../core/core.iml" filepath="$PROJECT_DIR$/../core/core.iml" />
+      <module fileurl="file://$PROJECT_DIR$/eg_app.iml" filepath="$PROJECT_DIR$/eg_app.iml" />
+    </modules>
+  </component>
+</project>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/eg_app/.idea/scopes/scope_settings.xml b/Open-ILS/src/Android/eg_app/.idea/scopes/scope_settings.xml
new file mode 100644 (file)
index 0000000..922003b
--- /dev/null
@@ -0,0 +1,5 @@
+<component name="DependencyValidationManager">
+  <state>
+    <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+  </state>
+</component>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/eg_app/.idea/uiDesigner.xml b/Open-ILS/src/Android/eg_app/.idea/uiDesigner.xml
new file mode 100644 (file)
index 0000000..3b00020
--- /dev/null
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>
+
diff --git a/Open-ILS/src/Android/eg_app/.idea/vcs.xml b/Open-ILS/src/Android/eg_app/.idea/vcs.xml
new file mode 100644 (file)
index 0000000..4fce1d8
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$/../../../.." vcs="Git" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/eg_app/AndroidManifest.xml b/Open-ILS/src/Android/eg_app/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..706b8a1
--- /dev/null
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="org.evergreen_ils.eg_app"
+          android:installLocation="auto"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+        android:minSdkVersion="10"
+        android:targetSdkVersion="19" />
+
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
+    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
+    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
+
+    <uses-feature android:name="android.hardware.screen.landscape" android:required="false" />
+    <uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
+    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/evergreen_launcher_icon"
+        android:label="@string/ou_app_label"
+        android:theme="@style/Theme.AppCompat" >
+
+        <activity
+                android:name="org.evergreen_ils.views.splashscreen.SplashActivity"
+                android:theme="@android:style/Theme.NoTitleBar">
+        </activity>
+        <activity
+                android:name="org.evergreen_ils.views.ChooseLibraryActivity"
+                android:label="@string/ou_account_label">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+        <!-- Search -->
+
+        <activity
+                android:name="org.evergreen_ils.searchCatalog.SampleUnderlinesNoFade"
+                android:label="@string/search_details_title">
+        </activity>
+        <activity
+                android:name="org.evergreen_ils.searchCatalog.MoreCopyInformation"
+                android:label="@string/copy_information_title">
+        </activity>
+        <activity
+                android:name="org.evergreen_ils.searchCatalog.SearchCatalogListView"
+                android:label="@string/title_search"
+                android:parentActivityName="org.evergreen_ils.views.MainActivity">
+            <meta-data
+                    android:name="android.support.PARENT_ACTIVITY"
+                    android:value="org.evergreen_ils.views.MainActivity"/>
+        </activity>
+        <activity
+                android:name="org.evergreen_ils.searchCatalog.AdvancedSearchActivity"
+                android:label="@string/advanced_search">
+        </activity>
+        <activity
+            android:name="org.evergreen_ils.barcodescan.CaptureActivity"
+            android:screenOrientation="landscape"
+            android:theme="@android:style/Theme.NoTitleBar"
+            android:windowSoftInputMode="stateAlwaysHidden" >
+        </activity>
+
+        <!-- Checkout Activities -->
+        <activity
+                android:name="org.evergreen_ils.accountAccess.checkout.ItemsCheckOutListView"
+                android:label="@string/checkout_items_title"
+                android:parentActivityName="org.evergreen_ils.views.MainActivity">
+            <meta-data
+                    android:name="android.support.PARENT_ACTIVITY"
+                    android:value="org.evergreen_ils.views.MainActivity"/>
+        </activity>
+
+        <!-- Holds Activities -->
+        <activity
+                android:name="org.evergreen_ils.accountAccess.holds.HoldsListView"
+                android:label="@string/hold_items_title"
+                android:parentActivityName="org.evergreen_ils.views.MainActivity">
+            <meta-data
+                    android:name="android.support.PARENT_ACTIVITY"
+                    android:value="org.evergreen_ils.views.MainActivity"/>
+        </activity>
+        <activity
+                android:name="org.evergreen_ils.accountAccess.holds.PlaceHold"
+                android:label="@string/hold_place_title">
+        </activity>
+        <activity
+                android:name="org.evergreen_ils.accountAccess.holds.HoldDetails"
+                android:label="@string/hold_details_title">
+        </activity>
+
+        <!-- Fines Activities -->
+        <activity
+                android:name="org.evergreen_ils.accountAccess.fines.FinesActivity"
+                android:label="@string/title_fines"
+                android:parentActivityName="org.evergreen_ils.views.MainActivity">
+            <meta-data
+                    android:name="android.support.PARENT_ACTIVITY"
+                    android:value="org.evergreen_ils.views.MainActivity"/>
+        </activity>
+
+        <!-- Bookbags -->
+        <activity android:name="org.evergreen_ils.accountAccess.bookbags.BookbagsListView" >
+        </activity>
+        <activity android:name="org.evergreen_ils.accountAccess.bookbags.BookBagDetails" >
+        </activity>
+
+        <activity
+            android:name="org.evergreen_ils.auth.AuthenticatorActivity"
+            android:label="@string/ou_account_label">
+        </activity>
+
+        <activity android:name="org.evergreen_ils.views.MainActivity">
+        </activity>
+
+        <service
+            android:name="org.evergreen_ils.auth.AuthenticatorService"
+            android:exported="false" >
+            <intent-filter>
+                <action android:name="android.accounts.AccountAuthenticator" />
+            </intent-filter>
+
+            <meta-data
+                android:name="android.accounts.AccountAuthenticator"
+                android:resource="@xml/authenticator" />
+        </service>
+    </application>
+</manifest>
diff --git a/Open-ILS/src/Android/eg_app/eg_app.iml b/Open-ILS/src/Android/eg_app/eg_app.iml
new file mode 100644 (file)
index 0000000..baccb65
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="android" name="Android">
+      <configuration>
+        <option name="UPDATE_PROPERTY_FILES" value="true" />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
+    </content>
+    <orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="core" />
+  </component>
+</module>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/eg_app/res/values/ou.xml b/Open-ILS/src/Android/eg_app/res/values/ou.xml
new file mode 100644 (file)
index 0000000..60a1cf8
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- ou.xml - app customization -->
+<resources>
+    <!-- see ../core/res/values/ou.xml for a description -->
+    <string name="ou_account_label">Evergreen Library</string>
+    <string name="ou_account_sign_in_message">Sign in to your\n%1$s account</string>
+    <string name="ou_account_type">org.evergreen-ils.eg_app</string>
+    <string name="ou_app_label">Evergreen</string>
+    <string name="ou_library_name"></string>
+    <string name="ou_library_url"></string>
+</resources>
index 3b0ed1e..3691d15 100644 (file)
@@ -13,11 +13,11 @@ use JSON;
 my $debug = 0;
 GetOptions("-d=i" => \$debug) or die;
 
-my $logcat = `adb logcat -d`;
+my $logcat = `adb logcat -d -v printable`;
 my @lines = split(/\r\n/, $logcat);
 foreach my $line (@lines) {
     print "line: $line\n" if $debug;
-    if ($line =~ /org.opensrf.net.http.GatewayRequest\( *\d+\): ?([^:]+):(.+)/) {
+    if ($line =~ /org.opensrf.net.http.GatewayRequest([^:]+):(.+)/) {
         my($key,$val) = ($1,$2);
         if ($key eq 'result') {
             my $obj = decode_json($val);
diff --git a/Open-ILS/src/Android/support/v7/gridlayout/.classpath b/Open-ILS/src/Android/support/v7/gridlayout/.classpath
deleted file mode 100644 (file)
index a4763d1..0000000
+++ /dev/null
@@ -1,8 +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="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
-       <classpathentry kind="output" path="bin/classes"/>
-</classpath>
diff --git a/Open-ILS/src/Android/support/v7/gridlayout/.project b/Open-ILS/src/Android/support/v7/gridlayout/.project
deleted file mode 100644 (file)
index 1e67516..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>android-support-v7-gridlayout</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>