• Stars
    star
    720
  • Rank 62,880 (Top 2 %)
  • Language
    Java
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build live location sharing in your Android app

Live Location Sharing

Open Source Love License: MIT

This open source app for Live Location Sharing is built with HyperTrack. Developers can now build live location sharing into their apps within minutes by using HyperTrack Live source code. For iOS, refer to our open source iOS repository.

HyperTrack Live for Android is available on the Google Play Store for use by users signed up with HyperTrack. HyperTrack Live for iOS is available on the public App Store.

👋 Read our blog post announcement to learn more about this sample app.

The app demonstrates a simple flow for users to share their live location with friends through their favorite messaging app when on the way to meet up. The convenient 23-character secure short-URL displays live location with accuracy, speed, bearing and recency. The view highlights the ongoing activity (walk, drive, stop, etc.). Device getting inactive due to permissions or other reasons, or disconnected due to unknown reasons is highlighted in the tracking experience. Battery charing and low battery states are flagged as well.

Live Location Sharing

The primary feature of Hypertrack Live is Live Location Sharing. Live Location Sharing is useful for:

  • Workforce productivity apps with messaging and customer support capabilities
  • Peer-to-peer marketplaces for goods and services
  • Ridesharing and carpooling apps
  • Consumer apps like messengers and social apps

It helps solve the user's anxiety of “where are you⁉️”.

Architecture

Architecture

Step by step process of communication:
  1. User makes a request to go to destination at location X
    • Prior to creating a trip to go to destination X, the user signs in into HyperTrack Live App using a HyperTrack account. HyperTrack Live App authenticates the user to Live App Backend and obtains a JWT auth token to access it. Live App Backend serves as a backend platform example for HyperTrack Live App to demonstrate the following:
      • Performs as HyperTrack Live App user management service. For this example, we use HyperTrack dashboard account user management as the way to perform HyperTrack Live App user management. You may wish to use your own user management setup for the app you are building.
      • Performs as HypeTrack Live App backend server performing HyperTrack APIs calls which require authentication via AccountId and SecretKey available in the setup page.
    • Once the user picks a location in the app and creates a trip with a destination to it, HyperTrack Live App performs a call to Live App Backend with the JWT token from the above.
  2. Create trip to destination at location X via Trips API
    • Live App Backend uses HyperTrack Trips API to create a trip with destination X. In order to authenticate to use the API, Live App Backend uses AccountId and SecretKey.
  3. Show trip route with ETA with live updates to the user
    • HyperTrack Views SDK queries the new trip information and provides trip information to HyperTrack Live App user. In addition, HyperTrack Views SDK receives realtime updates from HyperTrack platform and provides them as callbacks to HyperTrack Live App.
  4. User shares public short URL for the trip to locaton X with live ETA
    • HyperTrack Live App user can share a publicly visible trip URL for the trip with anyone on the internet with a browser.
  5. Short URL recipient tracks user with live ETA to destination at location X
    • The recipient or multiple recipients of the publicly visible trip URL can view HyperTrack Live App user ETA and location in realtime.
  6. User ends live location sharing
    • HyperTrack Live App user may end the trip upon reaching the destination. HyperTrack Live App notifies Live App Backend while authenticating with the JWT token from above.
  7. Complete trip to destination at location X via Trips API
    • Live App Backend uses HyperTrack Trips API to complete the trip with destination X.
    • HyperTrack Trips API updates HyperTrack Views SDK in HyperTrack Live App with a completed trip summary to be displayed to the user. Additionally, recipients of publicly visible trip URL receive a live update about the trip completion and are displayed a completed trip summary as well.

How HyperTrack Live App uses HyperTrack Trips API

HyperTrack Live App uses HyperTrack Trips API to create and complete trips by using Live App Backend. Live App Backend allows to integrate with HyperTrack Trips API via backend server integration.

Once the trip is created in the HyperTrack Live App, the Live App calls Live App Backend which in turn creates a trip via Trips API. Once the trip is completed, the app notifies Live App Backend, which in turn calls HyperTrack Trips API to complete the trip.

Usage

To use this app

Clone this repository
$ git clone https://github.com/hypertrack/live-app-android.git

$ cd live-app-android
Register app in Firebase
  1. Goto Firebase Console and create test project (or you can reuse existing one)

  1. Register new Android application using com.hypertrack.live package name.

  1. Download google-services.json file and copy it to app/ folder.

Run app on device

Go through one-time registration flow in the app.

Finish setup

Verify your email and proceed to setup page. where you should fill FCM Key section in Android paragraph obtained from Firebase Developer console > Project Settings (gear icon at top left) > Cloud Messaging tab.

Documentation

For detailed documentation of the APIs, customizations and what all you can build using HyperTrack, please visit the official docs.

Contribute

Feel free to clone, use, and contribute back via pull requests. We'd love to see your pull requests - send them in! Please use the issues tracker to raise bug reports and feature requests.

We are excited to see what Live Location feature you build in your app using this project. Do ping us at [email protected] once you build one, and we would love to feature your app on our blog!

Support

Join our Slack community for instant responses. You can also email us at [email protected].

More Repositories

1

hyperlog-android

Utility logger library for storing logs into database and push them to remote server for debugging
Java
692
star
2

ridesharing-android

Ridesharing driver & rider sample apps using HyperTrack SDK
Java
237
star
3

ridesharing-ios

Ridesharing driver & rider sample apps using HyperTrack SDK
Swift
102
star
4

placeline-nextjs

HyperTrack Placeline web application sample using NextJS, Ant-Design, Styled-Components, and Heroku
JavaScript
91
star
5

visits-ios

Visits app (iOS) built with HyperTrack
Swift
62
star
6

visits-android

Visits app (Android) built with HyperTrack
Kotlin
30
star
7

quickstart-android

Quickstart app for HyperTrack Android SDK
Java
21
star
8

quickstart-react-native

React Native Quickstart app for HyperTrack SDKs
TypeScript
18
star
9

live-app-ios

Build live location sharing in your iOS app
Swift
17
star
10

quickstart-ios

Quickstart app for HyperTrack iOS SDK
Swift
17
star
11

ridesharing-firebase

Firebase Cloud Functions for Ridesharing sample app
JavaScript
15
star
12

perseus

A visual debugger for location time series data
JavaScript
9
star
13

backend-nodejs

HyperTrack backend integration sample using ExpressJS, Socket.io, MongoDB, Heroku, and Push Notifications
JavaScript
8
star
14

sdk-react-native

React Native module for HyperTrack SDKs
Kotlin
7
star
15

views-react

ReactJS SDK to consume and customize HyperTrack views
JavaScript
7
star
16

sdk-flutter

Flutter plugin for HyperTrack generation SDKs
Kotlin
6
star
17

sdk-ios

HyperTrack iOS SDK Integration Guide
Ruby
5
star
18

quickstart-flutter

Quickstart app for HyperTrack Flutter SDK
Dart
4
star
19

sdk-views-ios

iOS SDK to consume and customize HyperTrack views
Swift
3
star
20

hypertrack-python

HyperTrack API wrapper
Python
2
star
21

sdk-android

HyperTrack Android SDK Integration Guide
2
star
22

sdk-views-android

Get HyperTrack data directly on your Android app to build views
Java
2
star
23

hypertrack-node

Hypertrack API node module
JavaScript
2
star
24

sdk-maps-google-android

Java
1
star
25

sdk-ionic-capacitor

Java
1
star
26

quickstart-expo

Expo Quickstart for HyperTrack SDK
TypeScript
1
star
27

scheduler-rabbitmq

Sample RabbitMQ scheduler implementation for Placeline application
JavaScript
1
star