Track My Location

Android real-time location tracker app (learn using Firebase 🔥, Google Maps & Location Api) 🌐
Alternatives To Track My Location
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Functions Samples11,676
2 days ago143apache-2.0JavaScript
Collection of sample apps showcasing popular use cases using Cloud Functions for Firebase
Flutterfire7,771847201a day ago107September 22, 2022300bsd-3-clauseDart
🔥 A collection of Firebase plugins for Flutter apps.
Gmscore5,646
4 days ago9February 01, 2022790apache-2.0Java
Free implementation of Play Services
Quickstart Js4,734
11 hours ago75apache-2.0HTML
Firebase Quickstart Samples for Web
Aarogyasetu_android2,831
2 years ago445otherJava
Aarogya Setu Android app native code
Cannercms2,430
a month ago41apache-2.0JavaScript
⚡️ Content Management Framework creates custom CMS fast and easy. Support data sources such as Firebase/Firestore, GraphQL and Restful APIs.
Santa Tracker Android2,085
a year ago21otherJava
Ho Ho Ho
Nativescript Plugin Firebase1,018125102 months ago159November 05, 2020594mitTypeScript
:fire: NativeScript plugin for Firebase
Cordova Plugin Firebase99620452 years ago43October 10, 2018253mitObjective-C
Cordova plugin for Google Firebase
Awesome Ionic807
3 years ago2cc0-1.0
An "awesome" list of Ionic resources
Alternatives To Track My Location
Select To Compare


Alternative Project Comparisons
Readme

Track My Location

This is a simple android app where you can brodcast your location and everyone who has your dynamically generated unique key can track you in near real-time.

I created this project just for learning puposes particularly about firebase (firestore db), google maps api and google location api.


Screenshots


References


How it works?

  • The first device get continous location update from gps, network etc. then
  • Write and update the location data to a specific firebase firestore document
  • Last, the second device read that firebase firestore document and show the marker in that location

Hot to integrate Google Maps & Location API

To use google maps in an android app you can use SupportMapFragment or MapView

  • Using google maps fragment (inside a layout or as a root tag)
<fragment
	android:id="@+id/map"
	android:name="com.google.android.gms.maps.SupportMapFragment"
	android:layout_width="match_parent"
	android:layout_height="match_parent"/>
  • Then you have to add permissions and google maps api key in the AndroidManifest.xml file

Add permisions for coase and fine location also add meta-data tag for API key


Integrate Google Play Services for Firebase into android project

  • Add this gradle plugin 'com.google.gms:google-services:3.1.1' into dependencies block of the top-level gradle build file

  • Apply the google play services plugin in the app level gradle build file (app project)

  • Then you can add google play services library for maps, location, places etc. (firebase needs google play services to operate)

  • You need to download and add google-services.json file to your project_name/app/ directory from firebase console when you add an android app to your firebase project
  • Here are the complete figure

enter the app package name & SHA-1 key (optional for firebase auth)


Getting API Key for Google Maps & Location

  • Go to the google cloud console page and click credentials submenu (or Get API Key )

  • Then create a new credential

  • New API key has been created, you can copy the key and paste in the manifest file. To restrict access of the key click the restrict button

  • You can restrict api key usage by selecting the platform or IP address by which the api call would be requested (Application restrictions)

  1. Select one of the application restrictions (in this case Android)
  2. Insert your android app package name
  3. Insert SHA-1 fingerprint of your app
  4. Click Save button

  • To get SHA-1 key you can use your android studo by opening your particular project -> select signingReport gradle task -> copy & paste the SHA-1 key into the android app restriction form

Popular Google Projects
Popular Firebase Projects
Popular Companies Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Google
Firebase
Location
Google Maps
Firestore
Mvvm Architecture