title: starting an activity from preferences.xml
body: <p>I'm trying to go to the settings screen found at -</p>
  
  <pre><code>android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS
  </code></pre>
  
  <p>From an entry in my preferences activity but am having no luck. At the moment, pressing the entry just refreshes the same screen as I was on.</p>
  
  <p>My preferences.xml looks like this:</p>
  
  <pre><code>&lt;Preference
           android:title="@string/my_location_settings"&gt;
      &lt;intent android:action="android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS"&gt;
      &lt;/intent&gt;
   &lt;/Preference&gt;
  </code></pre>
  
  <p>And my manifest entry looks like this:</p>
  
  <pre><code>&lt;activity android:name=".Preferences"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS" /&gt;
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>logcat:</p>
  
  <pre><code>12-11 15:53:34.170: INFO/ActivityManager(173): Starting activity: Intent { act=android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS cmp=com.my.app/.Preferences }
  12-11 15:53:34.400: INFO/ActivityManager(173): Displayed activity com.my.app/.Preferences: 229 ms (total 229 ms)
  </code></pre>
  
  <p>Manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p>
      </p>
  
  <pre><code>    &lt;activity android:name=".ViewActivity" android:label="@string/app_name"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity android:name=".MyPageOneActivity"&gt;
      &lt;/activity&gt;
      &lt;activity android:name=".MyPageTwoActivity"&gt;
      &lt;/activity&gt;
      &lt;activity android:name=".MyPageThreeActivity"&gt;
      &lt;/activity&gt;
      &lt;activity android:name=".Preferences"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.my.app.PREFERENCES" /&gt;
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  
  &lt;uses-sdk android:minSdkVersion="4" /&gt;
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"&gt;
  &lt;/uses-permission&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Preferences.java (
  sorry about the lack of formatting):</p>
  
  <pre><code>  package com.my.app;
  
  import android.os.Bundle;
  import android.preference.PreferenceActivity;
  
  public class Preferences extends PreferenceActivity {
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          addPreferencesFromResource(R.xml.preferences);
      }
  }
  </code></pre>
  
  <p>and preferences.xml:</p>
  
  <pre><code>&lt;PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;EditTextPreference 
      android:title="Address 1"
      android:key="customURLOne" 
      android:summary="Enter a new address for 1"&gt;
  &lt;/EditTextPreference&gt;
  &lt;EditTextPreference 
      android:title="Address 2"
      android:key="customURLTwo" 
      android:summary="Enter a new address for 2"&gt;
  &lt;/EditTextPreference&gt;
  &lt;EditTextPreference 
      android:title="Address 3"
      android:key="customURLThree" 
      android:summary="Enter a new address for 3"&gt;
  &lt;/EditTextPreference&gt;
   &lt;Preference android:title="@string/my_location_settings"&gt;
      &lt;intent android:action="android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS"&gt;
      &lt;/intent&gt;
   &lt;/Preference&gt;
  </code></pre>
  
  <p></p>