[go: up one dir, main page]

0% found this document useful (0 votes)
33 views12 pages

Technical Documentation 1

Uploaded by

Pravin Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views12 pages

Technical Documentation 1

Uploaded by

Pravin Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Technical Documentation -

The Hub Application

Product Name: The Hub


Platform: Android

1
Contents

 Product Overview............................................................................3
 Scope of Work:...............................................................................3
 Prerequisite....................................................................................3
 Frameworks....................................................................................3
 Architecture....................................................................................4
 Secured User Login…………………………………………………………………………
 Database........................................................................................4
 Product Feature Elements..............................................................5
1. Data Base optimization.........................................................................................5
2. Google Map Integration........................................................................................6
3. Geo Location Sorting.............................................................................................8

2
Product Overview

Using the Hub mobile application, Manage your Accounts, Doors, Slots and more
from a single application. Log activities, manage workflows and get the most out of your hub
experience all at your own pace, wherever you are! Requires proper login credentials as
obtained via TSI.

Scope of Work

This project focuses on the convenience & efficiency of the Hub in a


single app, Maximize your management of accounts, doors, contacts and more in
this all-new edition of the Hub mobile.

Prerequisite

 Development Toolkit-Android Studio Flamingo | 2022.2.1 Patch 1


(Build #AI-222.4459.24.2221.9971841, built on April 19, 2023)
 Code Language- Kotlin (222-1.8.20-release-AS3739.54)
 Minimum SDK Version-21
 Maximum SDK Version-33
 User Interface- XML(material:1.0.0)

Frameworks

 MSAL – Login Authentication


 Firebase/Analytics - Analytics monitoring
 Google Analytics – Analytics monitoring
 Firebase/Crashlytics - Capturing Crashlytics
 Google Map – Google Location Services
 Google Places – Google Location Services

3
Architecture

MVVM is an architecture that separates an application's user interface (UI) from


its business logic. It consists of three main components: Model, View, and View Model. Model:
The Model represents the data and business logic of the application.

Why MVVM with Clean Architecture?


 MVVM separates your view (i.e., Activity and Fragments) from your
business logic. MVVM is enough for small projects, but when your codebase becomes
huge, your View Models start bloating. Separating responsibilities becomes hard.
 MVVM with Clean Architecture is pretty good in such cases. It goes one
step further in separating the responsibilities of your code base. It clearly abstracts the
logic of the actions that can be performed in your app.

4
Advantages of Using Clean Architecture
 Your code is even more easily testable than with plain MVVM.
 Your code is further decoupled (the biggest advantage.)
 The package structure is even easier to navigate.
 The project is even easier to maintain.

The Layers of MVVM with Clean Architecture


The code is divided into three separate layers:

 Presentation Layer
 Domain Layer
 Data Layer

Our data flow will look like this.

5
Secured User Login

In hub App, for secured login we are Microsoft Authentication Library


(MSAL) with Single sign-on (SSO)

Single sign-on (SSO) allows a user to sign in once and get access to
other applications without re-entering credentials. This makes accessing apps easier and
eliminates the need for users to remember long lists of usernames and passwords.
Implementing it in your app makes accessing and using your app easier.

MSAL

Refresh Token

For security, a user access token is short-lived. However, a refresh token is


long-lived, and you can use it to renew a user access token after the token expires. The benefit
is that you don't need to get the account-owner's consent each time you need to renew their
user access token.

6
Database

Hub App operates in both offline and online modes. Certain modules
perform Offline mode while the rest will work in Online mode.
In Android Version we are using SQLite Database for storing offline data
Below list of modules in offline modes
 Door
 RIR
 Slot
 Door Visit
 Door Photos
 In-Store Display

7
CRUD
Database DB Commit
Operation

UI Screen
Is Timer sync
Online

App

Direct Sync

Product Feature Elements:

Let's discuss about the Key features in this project.

Data Base optimization

 Description
In Hub App Android Version, we are using Kotin coroutines to store large
data in SQLite Database by Asynchronous way.

To reduce updated data syncing time, we perform background sync using


Android Services.
While user performs any operation in offline it will store in local database once user comes online it
will send updated data to server and clear it in local database

8
 Design

Foreground Sync

Mobile App Login sync Server

UI DataBase API

Background Sync

Launching home screen

Mobile App Partial sync UI


Background sync

Updated data stored in database.

Database API Server

9
Google Map Integration

 Description
Get real-time GPS navigation, it shows your directions and uses real-
time traffic information to find the best route to your destination. Using google
map Service we have achieved directions for doors in door visit.

 Design:

Geo Location Sorting

Description
Location sorting can be done in two ways.
 Route Distance based sorting API.
 Radius based sorting.

Many Live map applications use route-based sorting.


However, this method works best when the source, destination, and waypoints are
already defined. In the Hub Application, we display nearby doors that are available
between the source and destination points. Therefore, we utilize the radius sorting
methodology.

10
Sorting based on Route Distance
Sorting the location points based on distance API.

Cons: Time consuming on sorting the routes points

Sorting Based on Radius: 


Sorting the location points based on radius.

Cons: Differ from actual route-based distance may happen if there are any blockages in
the route area or if any sea routes involved in way points.

11
12

You might also like