Git Product home page Git Product logo

truck-me-android's Introduction

TruckMe

Description

This repository contains Admin and Driver product flavor merge into single codebase.

Development

Requirements & Environment setup

  • Android Studio Artic Fox Beta (or newer) to be able to build the app.
  • JDK 1.8 or JDK11 (working on my development setup).
  • Kotlin-enabled project.

Installation

First clone this repository (See the options on the right hand side.)

In Android Studio, use the "Open an existing Android Studio project", find the downloaded project folder and select the (truck-me-android).

  1. Get an API Key.
  2. Open the local.properties file in root project (you must switch project structure from Android to Project in the top-left corner).
  3. Add a single line to local.properties that looks like MAPS_API_KEY=YOUR_API_KEY, where YOUR_API_KEY is the API key you obtained in the first step.
  4. For Places and Directions API Key. Just copy your API KEY and place this key to gradle.properties MAPS_API_KEY="PLACE_YOUR_API_KEY_HERE", where PLACE_YOUR_API_KEY_HERE is the same as your API key in the local.properties. See pull request #23
  5. Build and run.

Switching between Admin and Driver build variant

Navigate to Build Variants. (Can be found on the bottom left side of project panel)

Note: use only the adminDebug and driverDebug type for testing.

Clean and run the project.

Alternatively use the ./gradlew build command to build the project directly.

Modules

Modules are collection of source files and build settings that allow you to divide a project into discrete units of functionality. In this case apart from dividing by functionality/responsibility, existing the following dependence between them:

The above graph shows the app modularization:

  • :app module depends on :core and :lib.
  • :core and :lib doesn’t have any dependency.

App module

The :app module is an com.android.application, which is needed to create the app bundle. It is also responsible for initiating the dependency graph, play core and another project global libraries, differentiating especially between different app environments.

Core module

The :core module is an com.android.library for serving network requests, accessing to the database and shared preferences. Providing the data source for the many features that require it.

Libs module

The :libs module is an com.android.library only contains inset animations, drag and UI layout manipulation.

TODO

  • Add Unit tests
  • Add Integration tests

License

Copyright 2021 Force Porquillo (strongforce)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

truck-me-android's People

Contributors

forceporquillo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mahmoud2282

truck-me-android's Issues

Toolbar window decor exception for `Android version 8.0` and `Android 11`.

Caused by java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
       at androidx.appcompat.app.AppCompatDelegateImpl.setSupportActionBar(AppCompatDelegateImpl.java:575)
       at androidx.appcompat.app.AppCompatActivity.setSupportActionBar(AppCompatActivity.java:183)
       at dev.forcecodes.truckme.extensions.ActivityKt.fillDecor(Activity.kt:16)
       at dev.forcecodes.truckme.extensions.ActivityKt.fillDecor$default(Activity.kt:15)
       at dev.forcecodes.truckme.ui.auth.AuthActivity.onCreate(AuthActivity.kt:30)
       at android.app.Activity.performCreate(Activity.java:8207)
       at android.app.Activity.performCreate(Activity.java:8191)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3808)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4011)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:246)
       at android.app.ActivityThread.main(ActivityThread.java:8633)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.