Hello, I'm writing an application that takes a list of gps co-ordinates and distances and triggers an alert (for now) when a user enters the proximity of one of the co-ordinates. I'm trying to use a proximity alert to do this, which will fire a intent to be received by an intent receiver. This is all being done in a service, so it can be run in the background. However, im struggling with the pending intent part of .addproximityalert.
String intentKey = "android.intent.action.PROXIMITY_ALERT"; Intent proximityIntent = new Intent(intentKey); mPendingIntent = PendingIntent.getBroadcast(getContext (), 0, proximityIntent, PendingIntent.FLAG_CANCEL_CURRENT); lm.addProximityAlert(latitude, longitude, radius, -1, mPendingIntent); The idea being that when a proximity alert is triggered, android.intent.action.PROXIMITY_ALERT is broadcast for a receiver to pickup. Eclipse is telling me that i need to chance getContext to getBaseContext, but proximity alerts aren't firing when i change this. Any pointers? Thanks for any help, George --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---