GithubHelp home page GithubHelp logo

locationtracker's Introduction

LocationTracker

Track Location using Fused provider and GoogleMap

Goal

This Android tutorial will walk you through to create a location tracker using Android location API and Google maps services. This deals mainly with two areas, using the location API to continuously get the user location and showing that lat-long position in GoogleMap

Helps to understand

  1. Android location using fused provider
  2. Google Maps Android API v2
  3. Markers on Map

Fused Location Provider

  1. Simple APIs: Lets you specify high-level needs like "high accuracy" or "low power", instead of having to worry about location providers.
  2. Immediately available: Gives your apps immediate access to the best, most recent location.
  3. Power-efficiency: Minimizes your app's use of power. Based on all incoming location requests and available sensors, fused location provider chooses the most efficient way to meet those needs.
  4. Versatility: Meets a wide range of needs, from foreground uses that need highly accurate location to background uses that need periodic location updates with negligible power impact.

Prerequisite to use Google Maps API

  1. Create project in Google Console https://cloud.google.com/console/project
  2. Then go to menu “APIs & auth –> APIs” and switch on “Google Maps Android API v2”
  3. Create SHA1 Android key by running the following command in cmd prompt (you should have JDK installed and PATH setup). "keytool -list -v -keystore "%USERPROFILE%.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android"
  4. Grab SHA1 value from above cmd prompt and go back to Google Console to create Android API key. Go to menu “APIs & auth –> Credentials” in ‘Public API access’ click create new Key button. Then used the SHA1 key generated and the android application package to create and get the Android API key.
  5. Add Google Play Services to project dependency. Just add the following in Gradle dependencies. compile 'com.google.android.gms:play-services:6.5.87'

Note

  1. Please update AndroidManifest to update your key before running application

locationtracker's People

Contributors

rutulkotak avatar

Watchers

Jitendra Nath avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.