Thanks Mark, I visited a few days ago the anddev forum but I didn't
see the TrackBuilder example.

I have modified the TrackBuilder code:

I have put to the end of the onCreate function the code to add the
proximity alert:

        myLocationManager.addProximityAlert(LATITUDE_ALERT,
LONGITUDE_ALERT, RADIUS_ALERT, EXPIRATION_ALERT, new
Intent(this,alertClass.class));

[ alertClass is a simple Activity that shows a screen with a text. ]

    private boolean exit() {
        //remove proximity alert

Into exit function I remove the proximity alert, this is the code of
exit function:

    private boolean exit() {
        //remove proximity alert
        myLocationManager.removeProximityAlert(new
Intent(this,alertClass.class));

        this.finish();
        return true;
    }

In the DDMS perspective it seems that the proximity alert is added, I
see this line

DEBUG/LocationManager(614): addProximityAlert: latitude = 41.502881,
longitude = 2.110382, radius = 20.0, expiration = 100000, intent =
Intent { comp={net.mobilefight.trackbuilder/
net.mobilefight.trackbuilder.alertClass} }

I have created a new track and I specify the location of the proximity
alert,  this location is in the track and I have checked that the
permission android.permission.ACCESS_LOCATION is in the
AndroidManifest.xml, but... the alert is not fire, why?

Mark could explain me what I'm not doing correctly?.

Thanks for your time.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to