Play Audio based on location?

Hello,
Is it possible to play Audio based on the current location of the user?
I'm experimenting with making a sort of Audio Guide App and want the app to play the associated audio file (those will prob. be stored externaly) when a user is at or passing the corresponding location.
Is that possible? If so, how (mabye with the Location Sensor?)?

Thanks in advance!

Yes. I would use a ringed fence to check the distance to the location of interest. Here is an example Location sensor (ringed fence / circular ringed fence) - #2 by SteveJG . Yes, you will need a LocationSensor and perhaps a Clock to periodically check whether you are close.

You also can continually calculate the distance from the Location and when the distance is small, indicate you are there.

Here is a tutorial that might also help you decide how you want to determine if you are close.Social Distancing ... a CloudDB / Location Marker Tutorial to someone or something using a Map component.

When you are close, use the Player component to play your audio. Be careful how you trigger this as you might end up playing audio multiple times. You need it not to replay if you already played :cry:

1 Like

Thank, I'll look into this.