Skip to content

anshudwibhashi/uber_for_x_android

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uber-for-X driver & customer apps using HyperTrack SDK

Uber’s business model has given rise to a large number of Uber-for-X services. Among other things, X equals moving, parking, courier, groceries, flowers, alcohol, dog walks, massages, dry cleaning, vets, medicines, car washes, roadside assistance and marijuana. Through these on-demand platforms, supply and demand are aggregated online for services to be fulfilled offline.

This open source repo/s uses HyperTrack SDK for developing real world Uber-like consumer & driver apps.

  • Uber-for-X Consumer app can be used by customer to :
    • Login/signup customer using Firebase phone-number authentication
    • Show available cars near customer's current location
    • Allow customer to select pickup and dropoff location
    • Show estimated fare and route for selected pickup and dropoff location
    • Book a ride from desired pickup and dropoff location
    • Track driver to customer's pickup location
    • Track the ongoing ride to dropoff location
    • Let customers share live trip with friends and family
    • Show trip summary with distance travelled

  • Uber-for-X Driver app can be used by driver to :
    • Login/signup driver using Firebase phone-number authentication
    • Find new rides
    • Accept a ride
    • Track and navigate till customer's pickup location, and mark the pickup as complete
    • Track and navigate from customer's pickup to dropoff location, and mark the dropoff as complete
    • Show trip summary with distance travelled

How to Begin

1. Get your keys

2. Set up consumer & driver app

  • Clone the consumer & driver apps
  • Add the publishable key in DriverApp.java in Driver project and in ConsumerApp.java in Consumer project
  • Add your Google Maps key to google-maps-api.xml in each of your individual repos. Make sure you replace API keys in all environments (debug/release)

3. Set up FCM

The HyperTrack SDK requires FCM for a battery efficient real-time tracking experience

Note:

  • Both Consumer & Driver apps are using Firebase's default UI for login
  • Firebase login callbacks are used to trigger the upcoming flow.
  • In case you have custom login mechanism please make necessary changes and trigger the next flow.

4. Set up Firebase Realtime Database

  • Setup Firebase Realtime Database via Android studio. Go to: Android Studio --> Tools --> Firebase --> Realtime Database
  • Note that Firebase Realtime Database is not required to use HyperTrack SDK. You may have your own server that is connected to your apps

5. Mock Tracking

  • To overview the tracking experience provided by HyperTrack SDK, feel free to use "createMockAction" instead of "createAction" in Driver app (StartRideActivity.java).

  • No changes are required to be made in Consumer app with respect to createMockAction/ mock tracking.

  • Enabling/ disabling of mock tracking is handled from where actions are created.

  • In these samples apps, Driver app creates action, which are tracked by Driver & Consumer apps.

Release to PlayStore

To release the apps on the Play Store, you will have to change the apps' package names.

  1. Change the package name in AndroidManifest.xml file.

  2. Refactor the name of your package with right click → Refactor → Rename in the tree view, then Android Studio will display a window, select "Rename package" option.

  3. Change the application id in the build.gradle file. Once done, clean and rebuild the project.

    • Add release key store file in app level folder.
    • Create a keystore.properties file in root or project level folder with key-values pair.
        storeFile=<File path of keystore file>
        storePassword=<Key Store Password>
        keyAlias=<Key Alias>
        keyPassword=<Key Password>
  4. Check for pojos/ models mentioned in proguard-rules.pro

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, or interact with our growing community. You can also email us at [email protected].

About

HyperTrack Fork

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%