diff --git a/fmapp2/src/com/caf/fmradio/FMAdapterApp.java b/fmapp2/src/com/caf/fmradio/FMAdapterApp.java
index dbc17c5..40a6731 100644
--- a/fmapp2/src/com/caf/fmradio/FMAdapterApp.java
+++ b/fmapp2/src/com/caf/fmradio/FMAdapterApp.java
@@ -29,6 +29,7 @@
 public class FMAdapterApp extends Application {
     private static final String TAG = "FMAdapterApp";
     private static final boolean DBG = true;
+    public static FMAdapterApp context = null;  // Allow global access
     //For Debugging only
     private static int sRefCount=0;
 
@@ -39,6 +40,7 @@
 
     public FMAdapterApp() {
         super();
+        context = this;
         if (DBG) {
             synchronized (FMAdapterApp.class) {
                 sRefCount++;
diff --git a/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java b/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
index 58b3df8..fb383e1 100644
--- a/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
+++ b/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
@@ -37,6 +37,7 @@
 
 import android.content.Context;
 import android.content.SharedPreferences;
+import android.telephony.TelephonyManager;
 import qcom.fmradio.FmReceiver;
 import qcom.fmradio.FmConfig;
 import android.os.SystemProperties;
@@ -1194,9 +1195,34 @@
     * in the list, takes the default from resources.
     */
    private static int getBand(int deflt) {
+      // Try to determine the current location from the phone
+      // network. If unable, or not found in band list, try
+      // from locale. If that fails too, then use the default.
+      // TODO: Once a band is selected, the app remembers it in the
+      // shared preferences. This means the radio band isn't auto-updated
+      // if the user travels to a different country. A better approach would
+      // be to always call this code when the app starts up unless the user
+      // has explicitly set a band. In fact, "auto" should be one of the options.
+      // That will be the subject of another Jira, I think.
+      String countryCode;
+      int band;
+      try {
+         TelephonyManager tm = (TelephonyManager)
+            FMAdapterApp.context.getSystemService(Context.TELEPHONY_SERVICE);
+         countryCode = tm.getNetworkCountryIso();
+         if ((band = getBand(countryCode, -1)) >= 0) return band;
+      } catch (Exception e) {
+         // Failed, perhaps because of no sim card or inadequate permissions.
+         // Ignore it and carry on.
+      }
       return getBand(Locale.getDefault().getCountry(), deflt);
    }
 
+   /**
+    * Map a country code to an FM band code.
+    * @param country  2-letter country code
+    * @return band code or deflt on not found.
+    */
    private static int getBand(String country, int deflt) {
       // The order of country codes in this list is very strict; it
       // needs to exactly correspond to the REGIONAL_BAND definitions
@@ -1252,7 +1278,7 @@
       };
       for (int band = 0; band < countries.length; ++band) {
          for (String cc : countries[band]) {
-            if (cc.equals(country)) {
+            if (cc.equalsIgnoreCase(country)) {
                return band;
             }
          }
