Create an Android GPS tracking application

前端 未结 2 2185
鱼传尺愫
鱼传尺愫 2020-12-07 07:26

Recently, I\'ve taken up android development as a hobby and was looking to develop an application that can find and track a users position using Google Maps.

Once th

相关标签:
2条回答
  • 2020-12-07 07:38

    Basically you need following things to make location detector android app

    • Location Listener, which detect current location
    • Marker to add and animate when person moves
    • Polyline to add path on person's movement
    • Services for sending and receiving location
    • Rest API / Firebase Realtime Database to store and fetch locations

    Now if you write each of these module yourself then it needs much time and efforts. So it would be better to use ready resources that are being maintained already.

    Using all these resources, you will be able to create an flawless android location detection app.

    1. Location Listening

    You will first need to listen for current location of user. You can use any of below libraries to quick start.

    Google Play Location Samples

    This library provide last known location, location updates

    Location Manager

    With this library you just need to provide a Configuration object with your requirements, and you will receive a location or a fail reason with all the stuff are described above handled.

    Live Location Sharing

    Use this open source repo of the Hypertrack Live app to build live location sharing experience within your app within a few hours. HyperTrack Live app helps you share your Live Location with friends and family through your favorite messaging app when you are on the way to meet up. HyperTrack Live uses HyperTrack APIs and SDKs.

    2. Markers Library

    Google Maps Android API utility library

    • Marker clustering — handles the display of a large number of points
    • Heat maps — display a large number of points as a heat map
    • IconGenerator — display text on your Markers
    • Poly decoding and encoding — compact encoding for paths, interoperability with Maps API web services
    • Spherical geometry — for example: computeDistance, computeHeading, computeArea
    • KML — displays KML data
    • GeoJSON — displays and styles GeoJSON data

    3. Polyline Libraries

    DrawRouteMaps

    If you want to add route maps feature in your apps you can use DrawRouteMaps to make you work more easier. This is lib will help you to draw route maps between two point LatLng.

    trail-android

    Simple, smooth animation for route / polylines on google maps using projections. (WIP)

    Google-Directions-Android

    This project allows you to calculate the direction between two locations and display the route on a Google Map using the Google Directions API.

    A map demo app for quick start with maps

    0 讨论(0)
  • 2020-12-07 08:00

    The source code for the Android mobile application open-gpstracker which you appreciated is available here.

    You can checkout the code using SVN client application or via Git:

    • svn checkout http://open-gpstracker.googlecode.com/svn/trunk/ open-gpstracker-read-only
    • git clone https://code.google.com/p/open-gpstracker/

    Debugging the source code will surely help you.

    0 讨论(0)
提交回复
热议问题