Android Approximation alert not working
<p>I want to add approximation alert to my location manager. i am giving latitude and longituge and giving 20 in the distance paramater. when i give the same lat and long from the emulator , my approximation pending intent do not trigerr. whats wrong? </p>

<p>Here is my onCreate()</p>

<pre><code>@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        lm = (LocationManager) getSystemService(LOCATION_SERVICE);
        lm.addProximityAlert(31.4474, 73.08, 20, -1, PendingIntent.getActivity(
                Main.this, 0, new Intent(android.content.Intent.ACTION_VIEW,
                        Uri.parse("http://www.google.com")), 0));
        lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, new LocationListener() {

        @Override
        public void onStatusChanged(String arg0, int arg1, Bundle arg2) {}

        @Override
        public void onProviderEnabled(String arg0) {}

        @Override
        public void onProviderDisabled(String arg0) {}

        @Override
        public void onLocationChanged(Location arg0) {
            Toast.makeText(Main.this,arg0.getLatitude()+" "+arg0.getLongitude(), 300).show();
        }
    });
}
</code></pre>

<p>manifest.xml</p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.proximityalert"
    android:versionCode="1"
    android:versionName="1.0" 

&gt;

&lt;uses-sdk
    android:minSdkVersion="6"
    android:targetSdkVersion="10" /&gt;
&lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt;
&lt;uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/&gt;

&lt;application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" &gt;
    &lt;activity
        android:name="com.example.proximityalert.Main"
        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;
</code></pre>

<p></p>
