title: Android location manager permissions to be used
body: <p>I have the following code in my android project:</p>
  
  <pre><code>locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
  Criteria criteria = new Criteria();
  bestProvider = locationManager.getBestProvider(criteria, false);
  Location currentLocation = locationManager.getLastKnownLocation(bestProvider);
  location = currentLocation.getLatitude() + " " + currentLocation.getLongitude();
  MyLocation.setText(location);
  </code></pre>
  
  <p>I am getting an <code>provider == null</code>  error. what permissions do I need to use?</p>
  
  <p>My android manifest file is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.DuckTag"
    android:versionCode="1"
    android:versionName="1.0"&gt;
  &lt;uses-sdk android:minSdkVersion="8" /&gt;
  
  &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
      &lt;activity android:name=".DuckTagActivity"
                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;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Thank you</p>