0

A message should display when I'm entering a specific address except address number for instance "Kristian Augusts gate 0164 Oslo".

When I walk to the address and suddenly my gps phone discover that I am located at "Kristian Augusts gate 0164 Oslo" then message should display

How do you create such a functionality? Any advice or tutorial?

Thank you!

HelloWorld1
  • 13,688
  • 28
  • 82
  • 145

1 Answers1

0

First, you need to use a GPS service. You can either do it using Android API or Google Play Services API. The latter is a little more complicated and resource-intensive, but will provide more reliable location methods and callbacks.

Get location using Google Play Services

Then, when you already have the longitude and latitude you can easily get the address associated with that coordinates.

Get address from coordinates

Then you simply check if the current address is the same as the address intended to trigger the message and display it, using an AlertDialog, Toast, system notification or whichever method you need.

Community
  • 1
  • 1