Skip to content

An android mobile app to delivery/order the groceries to th ehouse.

License

Notifications You must be signed in to change notification settings

chensiyingcrystal/crystalInstacart

Repository files navigation

crystalInstacart

An android mobile app implementing part of the instacart driver app features.

Screenshots

Features

Key functionalities include:

  • account registration and login
  • location update and render it on the map
  • location search and autocomplete
  • route planning and simulate driver delivery

App scaffolding

Activity: HomeMapActivity, MainActivity Fragment: LoginFragment, HomeFragment

Workflow:

driver register/login -> automatically locate on the map -> search bar, autocomplete -> route planning

UI design:

Building UI in activities/fragments using navigation graph, followed material design.

MainActivity is the application's entry point. Each screen is implemented inside a Fragment. The navigation between them uses the Navigation Graph. The navigation is defined in nav_graph.xml. Using navigation graph can reduce dependencies and latency when switching between screens.

Sign in/sign up

Implement in LoginFragment, uses Firebase Realtime Database to store user auth data

Triggered by 2 buttons:

  • Register
  • Sign in

To get to the sign up screen, tap on "register" and enter an email, password and driver name. Then you can tap on "sign in " and enter email and password.

  • Login: firebase auth(sign in/register account)
  • fragment: check if email or phone is empty, password is empty/length < 6
  • firebase connect callback, check if register/login is successful

Location Realtime Update

Implement in HomeMapActivity

This allows user to fetch and render their realtime location with a marker on the google map when they successfully sign in. And this location will keep updated within 5s intervals.

  • location fetching: GMS Fused location provider
  • Start location update/stop update(start listening to location)
  • GetLastlocation(update latest location on map activity)

Location Search and AutoComplete

Implement in HomeMapActivity

This allows user to search any location in the search bar, and a set of options will be listed automatically. User can tap on any location in the list, triggering the driver going to this destination. This feature uses `Google Place Autocomplete API.

Route planning and motion simulation

Implement in HomeMapActivity and location module

This allows user to plan the route between the current location and the destination. A moving car will simulate driving along this route to complete delivery. This module uses [retrofit] to implement HTTP request,

  • once a place is selected in the last step, it will trigger function: getdirection(implement http request using retrofit)
  • using response(generated path) to draw route and draw moving car

Hilt Dependency Injection

All classes manage dependencies using Hilt to maintain/inject instance in right lifecycle.

Releases

No releases published

Packages

No packages published

Languages