What's wrong with this addProximity code?
Posted
by Pentium10
on Stack Overflow
See other posts from Stack Overflow
or by Pentium10
Published on 2010-06-07T23:17:49Z
Indexed on
2010/06/07
23:22 UTC
Read the original article
Hit count: 214
I have this code:
private void setupProximity() {
Intent intent = new Intent(this, viewContacts.class);
PendingIntent sender = PendingIntent.getBroadcast(this,
0, intent, 0);
LocationUtils.addProximity(this, -37.40, 144.55, 1000, 1000000, sender);
}
public static void addProximity(Context ctx,double lat, double lon, float rad,long exp, PendingIntent pintent) {
LocationManager lm = (LocationManager) ctx.getSystemService(Context.LOCATION_SERVICE);
lm.addProximityAlert(lat, lon, rad, exp, pintent);
}
Why I don't get the class to fire up? I am in the range of the zone.
© Stack Overflow or respective owner