Search code examples
androidgpslocationsnapchat

Android libraries and GPS Tracker suggestions


I want to make a Android Application similar to Maps on Snapchat where you can see all your friends in the Map and can track their location, also I need a cheap GPS tracker devices, can you guys suggest any Android libraries so I don't have to code from scratch and an easy GPS tracker device to work with, thanks! :)


Solution

  • 1) Don't your own smartphone include a GPS?

    2) Android has a Listener included called LocationListener that is just what you want. You can find the docs here: https://developer.android.com/reference/android/location/LocationListener.html

    How to do this: First create a LocationManager. Then a LocationListener and add the listener to the manager. A method that could be good to use is:

    LocationManager.requestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener)

    Which can be found in the documentation of LocationManager.