Skip to content

Dingoo Driver

Dingoo Driver is a React Native app designed to adapt its functionality based on device orientation and size:

  • Portrait Mode: Driver mode (works only on mobile phones).
  • Landscape Mode: Warehouse operator mode (works only on tablets).

Pre Requisites

Before starting, ensure you have the following tools and configurations:

  1. React Native:
  2. Set up React Native as per the official documentation.
  3. Java Development Kit:
  4. Install JDK, ensuring the version is not greater than 11.0.25.
  5. Website to download this version: Adoptium
  6. Node.js and npm:
  7. Install Node.js (includes npm).
  8. Yarn:
  9. Install Yarn globally:
    npm install -g yarn
    
  10. Android Studio:
  11. Install Android Studio to configure the Android development environment.
  12. Required for both emulator and physical device setups.

Getting Started

Follow these steps to set up and run the project:

  1. Clone the repository:
git clone <repository-url>
cd mobile
git checkout develop
  1. Initialize Git Flow:
git flow init
  1. Install dependencies:
yarn install
  1. Run the app in development mode:

The yarn android command will always build the development version (devDebug) using the dev flavor:

yarn android
  • This command will build the development version with variant=devDebug and flavor=dev.

  • Build the production APK:

To build the production APK, use the specific command for the prod build:

yarn android-build:prod
  1. Build the development APK:

To build the development APK (if you need a debug APK for the dev version), use the specific command:

yarn android-build:dev

Notes

  • The yarn android command will always build the APK for development (devDebug), with the dev flavor. This command is suitable for testing and continuous development.
  • To compile the production or development APK, use the commands yarn android-build:prod or yarn android-build:dev, respectively.
  • Ensure Android Studio is correctly configured and the Android SDK is installed.
  • You can use either an Android emulator or a physical device for testing.
  • Make sure your environment variables (e.g., JAVA_HOME) point to the correct Java version.