Improved UX of brand new user.
authorkenstir <kenstir@gmail.com>
Tue, 24 Nov 2015 02:38:47 +0000 (21:38 -0500)
committerkenstir <kenstir@gmail.com>
Tue, 24 Nov 2015 02:38:47 +0000 (21:38 -0500)
* In main menu, dynamically invalidate options menu when adding an account.
* In auth activity, default to library of first existing account.  If there
  are no existing accounts, then default to closest library by course GPS.

12 files changed:
Open-ILS/src/Android/core/AndroidManifest.xml
Open-ILS/src/Android/core/src/org/evergreen_ils/accountAccess/AccountUtils.java
Open-ILS/src/Android/core/src/org/evergreen_ils/auth/AuthenticatorActivity.java
Open-ILS/src/Android/core/src/org/evergreen_ils/searchCatalog/Library.java
Open-ILS/src/Android/core/src/org/evergreen_ils/views/MainActivity.java
Open-ILS/src/Android/core/src/org/evergreen_ils/views/splashscreen/LoadingTask.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/AndroidManifest.xml
Open-ILS/src/Android/hemlock_app/.idea/uiDesigner.xml [new file with mode: 0644]
Open-ILS/src/Android/hemlock_app/AndroidManifest.xml

index a0d21ad..3331085 100644 (file)
@@ -8,9 +8,10 @@
     android:versionName="1.0" >\r
 \r
     <uses-sdk\r
-            android:minSdkVersion="10"\r
+            android:minSdkVersion="15"\r
             android:targetSdkVersion="19" />\r
 \r
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>\r
     <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>\r
     <uses-permission android:name="android.permission.GET_ACCOUNTS"/>\r
     <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>\r
index 0bce6c0..8a3e88c 100644 (file)
@@ -18,7 +18,7 @@ import java.io.IOException;
  */
 public class AccountUtils {
 
-    public static Library getLibrary(Activity activity, String account_name, String account_type) {
+    public static Library getLibraryForAccount(Activity activity, String account_name, String account_type) {
         final AccountManager am = AccountManager.get(activity);
         Account account = new Account(account_name, account_type);
         String library_url = am.getUserData(account, Const.KEY_LIBRARY_URL);
@@ -36,7 +36,11 @@ public class AccountUtils {
             library_name = activity.getString(R.string.ou_library_name);
         }
 
-        return new Library(library_url, library_name, null);
+        return new Library(library_url, library_name);
+    }
+
+    public static Library getLibraryForAccount(Activity activity, Account account) {
+        return getLibraryForAccount(activity, account.name, account.type);
     }
 
     public static void invalidateAuthToken(Activity activity, String auth_token) {
index 0f39191..8b2d276 100644 (file)
@@ -2,6 +2,8 @@ package org.evergreen_ils.auth;
 
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
+import android.location.Location;
+import android.location.LocationManager;
 import android.text.TextUtils;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
@@ -20,6 +22,7 @@ import android.os.Bundle;
 import android.util.Log;
 import android.view.View;
 import android.widget.TextView;
+import org.evergreen_ils.accountAccess.AccountUtils;
 import org.evergreen_ils.globals.AppPrefs;
 import org.evergreen_ils.globals.Utils;
 import org.evergreen_ils.searchCatalog.Library;
@@ -57,8 +60,9 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
             String url = params[0];
             String result = null;
             try {
-                Log.d(TAG, "fetching "+url);
+                Log.d(TAG, "fetching " + url);
                 result = Utils.getNetPageContent(url);
+                //todo move json parsing to doInBackground
             } catch (Exception e) {
                 Log.d(TAG, "error fetching", e);
             }
@@ -66,14 +70,48 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
         }
 
         protected void onPostExecute(String result) {
-            Log.d(TAG, "results available: "+result);
+            Log.d(TAG, "results available: " + result);
+
+            // parse the response
             parseLibrariesJSON(result);
+
+            // if the user has any existing accounts, then we can select a reasonable default library
+            Library default_library = null;
+            Location last_location = null;
+            Account[] existing_accounts = AccountUtils.getAccountsByType(AuthenticatorActivity.this);
+            Log.d(Const.AUTH_TAG, "there are " + existing_accounts.length + " existing accounts");
+            if (existing_accounts.length > 0) {
+                default_library = AccountUtils.getLibraryForAccount(AuthenticatorActivity.this, existing_accounts[0]);
+                Log.d(Const.AUTH_TAG, "default_library=" + default_library);
+            } else {
+                LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
+                if (lm != null) last_location = lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
+            }
+
+            // Build a List<String> for use in the spinner adapter
+            // While we're at it choose a default library; first by prior account, second by proximity
+            Integer default_library_index = null;
+            float min_distance = Float.MAX_VALUE;
             ArrayList<String> l = new ArrayList<String>(libraries.size());
             for (Library library : libraries) {
+                if (default_library != null && TextUtils.equals(default_library.url, library.url)) {
+                    default_library_index = l.size();
+                } else if (last_location != null && library.location != null) {
+                    float distance = last_location.distanceTo(library.location);
+                    if (distance < min_distance) {
+                        default_library_index = l.size();
+                        min_distance = distance;
+                    }
+                }
                 l.add(library.directory_name);
             }
             ArrayAdapter<String> adapter = new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, l);
             librarySpinner.setAdapter(adapter);
+            if (default_library_index != null) {
+                librarySpinner.setSelection(default_library_index);
+            } else {
+                librarySpinner.setSelected(false);
+            }
         }
     }
 
@@ -95,11 +133,11 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
         libraries_directory_json_url = getString(R.string.evergreen_libraries_url);
 
         String accountName = getIntent().getStringExtra(ARG_ACCOUNT_NAME);
-        Log.d(TAG, "onCreate> accountName="+accountName);
+        Log.d(TAG, "onCreate> accountName=" + accountName);
         authTokenType = getIntent().getStringExtra(ARG_AUTH_TYPE);
         if (authTokenType == null)
             authTokenType = Const.AUTHTOKEN_TYPE;
-        Log.d(TAG, "onCreate> authTokenType="+authTokenType);
+        Log.d(TAG, "onCreate> authTokenType=" + authTokenType);
 
         if (isGenericApp()) {
             librarySpinner = (Spinner) findViewById(R.id.choose_library_spinner);
@@ -115,8 +153,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
                 }
             });
         } else {
-            selected_library = new Library(getString(R.string.ou_library_url),
-                    getString(R.string.ou_library_name), null);
+            selected_library = new Library(getString(R.string.ou_library_url), getString(R.string.ou_library_name));
         }
 
         TextView signInText = (TextView) findViewById(R.id.account_sign_in_text);
@@ -135,7 +172,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
                 });
 
         if (savedInstanceState != null) {
-            Log.d(TAG, "onCreate> savedInstanceState="+savedInstanceState);
+            Log.d(TAG, "onCreate> savedInstanceState=" + savedInstanceState);
             if (savedInstanceState.getString(STATE_ALERT_MESSAGE) != null) {
                 showAlert(savedInstanceState.getString(STATE_ALERT_MESSAGE));
             }
@@ -170,7 +207,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
 
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        Log.d(TAG, "onActivityResult> requestCode="+requestCode+" resultCode="+resultCode);
+        Log.d(TAG, "onActivityResult> requestCode=" + requestCode + " resultCode=" + resultCode);
         // The sign up activity returned that the user has successfully created
         // an account
         if (requestCode == REQ_SIGNUP && resultCode == RESULT_OK) {
@@ -199,20 +236,20 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
                 Bundle data = new Bundle();
                 try {
                     authtoken = EvergreenAuthenticator.signIn(selected_library.url, username, password);
-                    Log.d(TAG, "task> signIn returned "+authtoken);
+                    Log.d(TAG, "task> signIn returned " + authtoken);
 
                     data.putString(AccountManager.KEY_ACCOUNT_NAME, username);
                     data.putString(AccountManager.KEY_ACCOUNT_TYPE, accountType);
                     data.putString(AccountManager.KEY_AUTHTOKEN, authtoken);
                     data.putString(PARAM_USER_PASS, password);
-                    data.putString(Const.KEY_LIBRARY_NAME, selected_library.short_name);
+                    data.putString(Const.KEY_LIBRARY_NAME, selected_library.name);
                     data.putString(Const.KEY_LIBRARY_URL, selected_library.url);
                 } catch (AuthenticationException e) {
                     if (e != null) errorMessage = e.getMessage();
-                    Log.d(TAG, "task> signIn caught auth exception "+errorMessage);
+                    Log.d(TAG, "task> signIn caught auth exception " + errorMessage);
                 } catch (Exception e2) {
                     if (e2 != null) errorMessage = e2.getMessage();
-                    Log.d(TAG, "task> signIn caught other exception "+errorMessage);
+                    Log.d(TAG, "task> signIn caught other exception " + errorMessage);
                 }
                 if (authtoken == null)
                     data.putString(KEY_ERROR_MESSAGE, errorMessage);
@@ -225,9 +262,9 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
             @Override
             protected void onPostExecute(Intent intent) {
                 task = null;
-                Log.d(TAG, "task.onPostExecute> intent="+intent);
+                Log.d(TAG, "task.onPostExecute> intent=" + intent);
                 if (intent.hasExtra(KEY_ERROR_MESSAGE)) {
-                    Log.d(TAG, "task.onPostExecute> error msg: "+intent.getStringExtra(KEY_ERROR_MESSAGE));
+                    Log.d(TAG, "task.onPostExecute> error msg: " + intent.getStringExtra(KEY_ERROR_MESSAGE));
                     onAuthFailure(intent.getStringExtra(KEY_ERROR_MESSAGE));
                 } else {
                     Log.d(TAG, "task.onPostExecute> no error msg");
@@ -240,7 +277,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
     protected void onAuthFailure(String errorMessage) {
         showAlert(errorMessage);
     }
-    
+
     protected void showAlert(String errorMessage) {
         AlertDialog.Builder builder = new AlertDialog.Builder(this);
         alertMessage = errorMessage;
@@ -264,10 +301,10 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
         String library_name = intent.getStringExtra(Const.KEY_LIBRARY_NAME);
         String library_url = intent.getStringExtra(Const.KEY_LIBRARY_URL);
         final Account account = new Account(accountName, accountType);
-        Log.d(TAG, "onAuthSuccess> accountName="+accountName);
+        Log.d(TAG, "onAuthSuccess> accountName=" + accountName);
 
         //if (getIntent().getBooleanExtra(ARG_IS_ADDING_NEW_ACCOUNT, false))
-        Log.d(TAG, "onAuthSuccess> addAccountExplicitly "+accountName);
+        Log.d(TAG, "onAuthSuccess> addAccountExplicitly " + accountName);
         String authtoken = intent.getStringExtra(AccountManager.KEY_AUTHTOKEN);
         String authtokenType = authTokenType;
 
@@ -279,7 +316,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
             userdata.putString(Const.KEY_LIBRARY_URL, library_url);
         }
         if (accountManager.addAccountExplicitly(account, accountPassword, userdata)) {
-            Log.d(TAG, "onAuthSuccess> true, setAuthToken "+authtoken);
+            Log.d(TAG, "onAuthSuccess> true, setAuthToken " + authtoken);
             // Not setting the auth token will cause another call to the server
             // to authenticate the user
             accountManager.setAuthToken(account, authtokenType, authtoken);
@@ -302,15 +339,15 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
         libraries.clear();
 
         if (isDebuggable()) {
-            Library library = new Library("https://demo.evergreencatalog.com", "evergreencatalog.com Demo", "0ut There, US  (evergreencatalog.com Demo)");
-            //Library library = new Library("http://mlnc4.mvlcstaff.org", "MVLC Demo", "0ut There, US (MVLC Demo)");// SSL not working
+            Library library = new Library("https://demo.evergreencatalog.com", "evergreencatalog.com Demo", "0ut There, US  (evergreencatalog.com Demo)", null);
+            //Library library = new Library("http://mlnc4.mvlcstaff.org", "MVLC Demo", "0ut There, US (MVLC Demo)", null);// SSL not working
             libraries.add(library);
         }
 
         if (json != null) {
-            List<Map<String,?>> l;
+            List<Map<String, ?>> l;
             try {
-                l = (List<Map<String,?>>) new JSONReader(json).readArray();
+                l = (List<Map<String, ?>>) new JSONReader(json).readArray();
             } catch (JSONException e) {
                 Log.d(TAG, "failed parsing libraries array", e);
                 return;
@@ -319,7 +356,12 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
                 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);
+                Double latitude = (Double) map.get("latitude");
+                Double longitude= (Double) map.get("longitude");
+                Location location = new Location("");
+                location.setLatitude(latitude);
+                location.setLongitude(longitude);
+                Library library = new Library(url, short_name, directory_name, location);
                 libraries.add(library);
             }
 
@@ -330,13 +372,13 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
                 }
             });
 
-            for (int i = 0; i< libraries.size(); ++i) {
-                Log.d(TAG, "c["+i+"]: "+ libraries.get(i).directory_name);
+            for (int i = 0; i < libraries.size(); ++i) {
+                Log.d(TAG, "c[" + i + "]: " + libraries.get(i).directory_name);
             }
         }
     }
 
     public boolean isDebuggable() {
-        return ( 0 != ( getApplicationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE ) );
+        return (0 != (getApplicationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE));
     }
 }
index ef0f5a9..648f0af 100644 (file)
@@ -1,5 +1,6 @@
 package org.evergreen_ils.searchCatalog;
 
+import android.location.Location;
 import android.text.TextUtils;
 
 /** value class
@@ -7,11 +8,16 @@ import android.text.TextUtils;
  */
 public class Library {
     public String url;            // e.g. "https://catalog.cwmars.org"
-    public String short_name;     // e.g. "C/W MARS"
+    public String 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) {
+    public Location location;
+    public Library(String url, String name, String directory_name, Location location) {
         this.url = url;
-        this.short_name = short_name;
+        this.name = name;
         this.directory_name = directory_name;
+        this.location = location;
+    }
+    public Library(String url, String name) {
+        this(url, name, null, null);
     }
 }
index bc32116..a7bf6cc 100644 (file)
@@ -69,6 +69,7 @@ public class MainActivity extends ActionBarActivity {
             SplashActivity.restartApp(this);
             return true;
         } else if (id == R.id.action_add_account) {
+            invalidateOptionsMenu();
             AccountUtils.addAccount(this, new Runnable() {
                 @Override
                 public void run() {
index 17e97ed..1e77509 100644 (file)
@@ -100,8 +100,8 @@ public class LoadingTask {
             if (TextUtils.isEmpty(auth_token) || TextUtils.isEmpty(account_name))
                 return "no account";
 
-            Library library = AccountUtils.getLibrary(mCallingActivity, account_name, accountType);
-            AppPrefs.setString(AppPrefs.LIBRARY_NAME, library.short_name);
+            Library library = AccountUtils.getLibraryForAccount(mCallingActivity, account_name, accountType);
+            AppPrefs.setString(AppPrefs.LIBRARY_NAME, library.name);
             AppPrefs.setString(AppPrefs.LIBRARY_URL, library.url);
 
             Log.d(TAG, tag+"Loading resources from "+library.url);
index c6add35..248b322 100644 (file)
@@ -6,7 +6,7 @@
           android:versionName="1.5">
 
     <uses-sdk
-        android:minSdkVersion="10"
+        android:minSdkVersion="15"
         android:targetSdkVersion="19" />
 
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
index 8d28930..2d72fcf 100644 (file)
@@ -10,5 +10,5 @@
     <string name="ou_app_label">C/W MARS</string>
     <string name="ou_library_name">C/W MARS</string>
     <string name="ou_activity_subtitle">%2$s</string>
-    <string name="ou_library_url">https://bark.cwmars.org</string>
+    <string name="ou_library_url">https://catalog.cwmars.org</string>
 </resources>
index d497a19..54d58de 100644 (file)
@@ -6,7 +6,7 @@
           android:versionName="1.0">
 
     <uses-sdk
-        android:minSdkVersion="10"
+        android:minSdkVersion="15"
         android:targetSdkVersion="19" />
 
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
index f5247e2..8098bc6 100644 (file)
@@ -6,9 +6,10 @@
           android:versionName="1.0">
 
     <uses-sdk
-        android:minSdkVersion="10"
+        android:minSdkVersion="15"
         android:targetSdkVersion="19" />
 
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
     <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" />
diff --git a/Open-ILS/src/Android/hemlock_app/.idea/uiDesigner.xml b/Open-ILS/src/Android/hemlock_app/.idea/uiDesigner.xml
new file mode 100644 (file)
index 0000000..e96534f
--- /dev/null
@@ -0,0 +1,124 @@
+<?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>
\ No newline at end of file
index 9b332cf..6ee5a6e 100644 (file)
@@ -2,13 +2,14 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="net.kenstir.apps.hemlock"
           android:installLocation="auto"
-          android:versionCode="3"
+          android:versionCode="4"
           android:versionName="1.0">
 
     <uses-sdk
         android:minSdkVersion="15"
         android:targetSdkVersion="19" />
 
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
     <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" />