> For the complete documentation index, see [llms.txt](https://fleetmulti.hyvikk.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fleetmulti.hyvikk.space/fundamentals/getting-setup.md).

# Getting Setup

<details>

<summary>Step1: Creating your Google Developers Account (Paid) [Pre-Requisites]</summary>

You can create a google developers Account from below URL. <https://play.google.com/apps/publish/signup/>

To Learn How to Register Check below Link.  <https://support.google.com/googleplay/android-developer/answer/6112435?hl=en>

</details>

<details>

<summary>Step 2: Updating Package Name</summary>

Before creating project in Firebase console, you first need to update the Package Name **“com.hyvikk.thefleet.vendors”**.

It is Required to Change else you want be able to Publish **Fleet MultiBranch App** to Playstore.

To know how to Update it check Below link. <https://stackoverflow.com/questions/16804093/rename-package-in-android-studio>

</details>

{% hint style="warning" %}

#### Note: if you want to publish your app to Google Playstore, you must update the package name. Google Playstore won’t accept Apps with same package name.

{% endhint %}

<details>

<summary>Step 3: Adding Firebase to Project/App.</summary>

To do this Just Follow Steps as mentioned in Below Webpage. <https://www.geeksforgeeks.org/adding-firebase-to-android-app/>

***Notes:***&#x20;

&#x20; *a. You must be logged in to the Respective gmail account through which you have created **Google Developers Account**.*

&#x20; b. Replace the old **“google-services.json”** with the file Automatically created in Firebase Console while Creating Project.

&#x20; c. You don’t need to add **"firebase sdk"** as it is already there within the project. Just skip that step and Go to Next Step.

</details>

<details>

<summary>Step 4: Connecting To Firebase “Realtime Database”.</summary>

*Important Note : You Must have Purchased & Configured* [*Fleet Manager Android App*](https://play.google.com/store/apps/details?id=com.hyvikk.thefleetmanager\&hl=en\&gl=US)

* Open Firebase Project which has been created for **“*****Fleet Manager Android App”*** from <https://console.firebase.google.com>
* Select Database > Realtime Database and Complete the Steps.
* Copy Database URL from the **“Data”** tab \[As Shown in Below Image].
  * E.g. <https://abc-hyvikk-215511.firebaseio.com/>

</details>

<figure><img src="/files/6uCJtON9MD2JgnJOAOXo" alt=""><figcaption><p>Firebase Realtime Database</p></figcaption></figure>

<details>

<summary>Step 5: Updating BASE URL for APIs (APIClient.java) from Project Code.</summary>

This will Connect your App To **"**[**Fleet Manager Web Admin**](https://codecanyon.net/item/fleet-manager/20051839)**".**

* Find this file at below mentioned path from the Project Code.
  * “ FleetVendors/app/src/main/java/com/hyvikk/thefleet/vendors/API/APIClient.java ”
* Find **Vendor API Module** from your **“Fleet Manager Web Admin”** Setup.
* Set Vendor API  URL in **"BASE\_URL".**

</details>

<details>

<summary>Step 6: Updating ABOUT Screen URLs (strings.xml) from Project Code.</summary>

To Update Company Page URLs Like Terms & Conditions and Privacy Policy.

#### Find this file at below mentioned path from the Project Code.

&#x20;   “FleetVendors/app/src/main/res/values/strings.xml”

* TC\_URL : This String is used to Add **Terms & Conditions** Page Link in Mobile App.
  * It is Recommended to set it for the Consumer’s Point of view. Write Terms & Conditions as per your Company policy and Create a Webpage for it. After that Set that URL in “TC\_URL”.
* PRIVACYPOLICY\_URL : This String is used to Add **Privacy Policy** Page Link in Mobile App.
  * It is recommended to set it for the Consumer’s Point of view. Write Privacy Policy Terms as per your Company policy and Create a Webpage for it. After that Set that URL in “PRIVACYPOLICY\_URL”.
* FACEBOOK\_URL : Facebook Page URL of your App/Company.
* TWITTER\_URL : Twitter Page URL of your App/Company.
* INSTAGRAM\_URL : Instagram Page URL of your App/Company.

</details>

<details>

<summary>Step 7: Creating Google API key for the App.</summary>

To Create  API Key for your App Project Follow Steps Mentioned in Below URL.

&#x20;   <https://support.google.com/googleapi/answer/6158862?hl=en>

</details>

<details>

<summary>Step 8: Enabling APIS for the Project [Required].</summary>

APIS will help you run **"Fleet MultiBranch App"** Properly. It is Mandatory to Enable it from Google > API Library.

To Enable APIs; Follow Below Mentioned Steps.

* Go to the [API Console](https://console.cloud.google.com/apis/dashboard).
* From the Projects list, select **“Fleet MultiBranch App”** project or **create a new one**.
* Open **"APIs & services"** Page from the Navigation Menu\[Left Side].
* Click on **"Library"**, To Open Complete **"API Library"** Collection.
* Search for Below Mentioned APIs Using "Search Box" and **Enable it**.
  * *Places API*
  * *Identity Toolkit API*
  * *Maps SDK for Android*
* ***DONE !** You have ENABLED Required APIs.🎉*

</details>

<details>

<summary>Step 9: Enabling Billing for the Project APIs on Google Developers Console</summary>

To Increase the APIs Usage Limit, you must add billing Account for your Project.

Follow Steps mentioned in below URL to Enable Billing.&#x20;

<https://support.google.com/googleapi/answer/6158867?hl=en&ref_topic=7013279>

</details>

{% hint style="info" %}
Google has **Free Usage Limits** for **"Places & Maps Related APIs"**. To Smoothly Run the App; It is Required to Add/Enable Billing for the **"Fleet Vendors App"** Project on Google Developers Console.
{% endhint %}

<details>

<summary>Step 10: Updating Firebase Realtime Database &#x26; Access Keys (strings.xml) From Project Code.</summary>

Firebase Realtime Database will be used to Access Driver's Location Data of [**"Fleet Manager App"**](https://play.google.com/store/apps/details?id=com.hyvikk.thefleetmanager).

* Find this file at below mentioned path from Project Code.
  * “ FleetVendors/app/src/main/res/values/strings.xml ”
* Update Values of Below Mentioned Variables.
  * firebase\_database\_url : This URL is used to Connect and Access Driver's Location Data for **Tracking Feature**. The Location's data which will be Accessed are of Driver Users from ["Fleet Manager App"](https://play.google.com/store/apps/details?id=com.hyvikk.thefleetmanager).
    1. Copy "Database URL" As Mentioned in **STEP 4**.&#x20;
    2. You can Find it from "Realtime Database > Data Tab".
    3. Set the Copied URL.
  * firebase\_application\_id : To Connect App with Firebase Project of [**Fleet Manager Mobile App**](https://play.google.com/store/apps/details?id=com.hyvikk.thefleetmanager).
    1. Find “**Application\_id / Project ID**” from "Firebase Project > Project Settings > General Tab".
    2. Copy "Application id".
    3. Set it in Above Variable.
  * firebase\_api\_key : To Connect & Access Database of [**Fleet Manager Mobile App**](https://play.google.com/store/apps/details?id=com.hyvikk.thefleetmanager) from Fleet Vendors App.
    1. Find the “**API Key / Web API Key**” from "Firebase Project > Project Settings > General Tab".
    2. Copy "API Key".
    3. Set it in Above Variable.

</details>

<details>

<summary>Step 11: Updating Google Maps API key (google_maps_api.xml) from Project Code.[Important]</summary>

Google Maps API Key will be Used for **"Google Place Search"** in **"Add Booking"** Feature.

* Find this file at below mentioned path from Project Code.
  * “ FleetVendors/app/src/main/res/values/google\_maps\_api.xml ”
* Copy the **“API-KEY”** that you have generated in ***Step-7***.
* About Variables.
  * **google\_maps\_key :** To Search Place OR Location for **Pickup & Dropoff Addresses** in **“Add Booking Feature”** of **“Fleet MultiBranch App”**.
* Set Copied **"API-KEY"** in Above Variable.

</details>

## Complete 🎯

You have successfully Configured Google Firebase and Google Developers Console for **“Fleet MultiBranch App”**.

> #### Now, Your *“**Fleet MultiBranch** App”* is fully prepared to shine! ✨

### ⚡⚡Enjoy its powerful features & functionalities.⚡⚡
