Nov 7, 2023
Building a Live Location Sharing and Tracking App Using gluestack-ui with Expo React Native and Google Maps API
This step-by-step guide with code examples shows you how to build a live location sharing & tracking app using gluestack-ui with expo React Native and Google Maps API.
Author


Book a call
Table of Contents
Prerequisites
- Node.js and npm are installed on your system.
- React Native development environment set up. You can follow the official React Native documentation to set it up.
Setting up the Project
For expo-location, we need to do some configuration in your app.json/app.config.js
Before working on the code, we need the Google API key to use the maps API.
Google Maps API Setup
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Enable the "Maps JavaScript API" and "Places API" for your project.
- Create an API Key for your project.
To use Google Maps on iOS devices, we need to attach the obtained API key in our app.json/app.config.js file.
Building the Live Location Tracking Feature
Let us create a UI to display the maps and the marker for the user location.
Building the Live Location Sharing Feature
- Push Location - To push the user updated location to back on a specific interval.
- Share Location - To share the user location on a targeted user Email.
- Get Locations Shared to User - To fetch all the user lists whose locations are shared with the user (return an array of the object).
- Stop Location - To stop the location sharing for the specific user by passing the targeted Email.
We need to call the function in our app.tsx file inside useEffect.
We are pushing the user location in every 10-second interval to the back-end.
Sharing the Location to User Email
Now call the Share Location API to start sharing the location from the back-end:
Now, as we are done with the sharing part, we have to check for any location that is shared with us. We will call the API Get Location shared with the User to get the array of the shared location. To listen to the live location of other users, we need to implement the web-socket for real-time update. For this, we are using sockjs-client and stopmjs. We need to install this package:
To display the marker for every user we need to loop through the list allRecievedLocations.
Check out the output for the app here:
For full source code please visit GitHub.
Summing Up
Subscribe to Our Newsletter
Subscribe to RSS
Press & Media Hub RSS FeedRelated Articles.
More from the engineering frontline.
Dive deep into our research and insights on design, development, and the impact of various trends to businesses.

Jun 27, 2026
Building a Resilient Hybrid-Cloud Network with WireGuard HA, Route-Based Failover, and Deep Observability

Jun 19, 2026
We Built a 114-Second AWS-to-Azure Failover. Here’s What We Learned

Jun 12, 2026
Cloud-Native and Cloud-Agnostic Are Not Ideologies; They Are Business-Stage Decisions

Jun 8, 2026
Geeklego: The Open-Source Design System Built to Work With AI

May 18, 2026
Your Vibe Code Has No Memory. DESIGN.md Fixes That.

May 14, 2026