How do I program MyLocation to alert when in proximity of required location?

Hi there gentle folk. I am new to AppInventor. I have successfully followed the instructions in and it works great.

I am now trying to figure out how to enhance this App so that when MyLocation is in the proximity of the select Address, the phone will buzz to alert me - like a wake me up application for travelling by bus/train. How do I get started to do this? Do I use the LocationSensor.1 block with an embedded Logic block - or something else? Appreciate someone pointing me. Thanks in advance.

Also, out of the several books out there, any recommendations?

Try to make like this :

Thanks Salman. I'll give it a go. Appreciated.

You're welcome

Welcome @Learner

Create a ringed-fence similar to the example described here Location sensor (ringed fence / circular ringed fence) .

Alternatively, calculate the distance from your current location constantly (perhaps using a Clock); when the distance is small (perhaps 10 meters or so) you determine you have arrived. There are several way to calculate distance between two points; use a Blocks algorithm or use the built-in method in the Maps/MapMarker components. These methods are described here>Calculer la distance entre son domicile et un point donnée dans une textbox .

If you check your CurrentAddress to exactly match a coded address (in a Text box or in a List selected from a ListPicker) your app will almost certainly never warn you that you have arrived because the two 'addresses' will almost never match exactly.

Read about Accuracy in * Using the Location Sensor . The tutorials explain why it is nearly impossible to determine whether a CurrentAddress matches an actual street address with any reliability.
Read about CurrentAddress HOW TO: Parse a LocationSensor's Current Address by SteveJG


1 Like