Hi everyone,

I have an application which needs to call a new screen if it comes within
the proximity of a few locations. So I am using the addProximityAlerts()
function as follows: But this does not work at all. My code is shown below

*public void setupLocationMonitoring(Intent newIntent) {

        for (int i = 0; i < locations.size(); i++) {
            newIntent.putExtra("widgetId", i);
            newIntent.setAction(IntentAction);
            PendingIntent intent1= PendingIntent.getBroadcast(HaiMap.this,
i, newIntent, PendingIntent.FLAG_CANCEL_CURRENT);
            double lati=(double) (locations.get(i).getLatitudeE6()) / 1E6;
            double longi =(double) (locations.get(i).getLongitudeE6()) /
1e6;
            lm.addProximityAlert(lati,longi,200,0, intent1);
        }
    }
*
The Manifest entry for the broadbase receiver which is supposed to receive
the intents is as follows;
*
  <receiver android:name="com.deepak.sample.receiver.MyBroadCastReceiver">
            <intent-filter>
                <action
android:name="com.deepak.sample.view.HaiMap.intentWiki"></action>
            </intent-filter>
  </receiver>*


I am trying to create proximity alerts for a few locations with the
following code. I have searched for some time but there is no good answer to
this question anywhere on the web.


Thanks and Regards,
Deepak

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to