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:
- React Native:
- Set up React Native as per the official documentation.
- Java Development Kit:
- Install JDK, ensuring the version is not greater than 11.0.25.
- Website to download this version: Adoptium
- Node.js and npm:
- Install Node.js (includes npm).
- Yarn:
- Install Yarn globally:
- Android Studio:
- Install Android Studio to configure the Android development environment.
- Required for both emulator and physical device setups.
Getting Started
Follow these steps to set up and run the project:
- Clone the repository:
- Initialize Git Flow:
- Install dependencies:
- Run the app in development mode:
The yarn android command will always build the development version (devDebug) using the dev flavor:
-
This command will build the development version with
variant=devDebugandflavor=dev. -
Build the production APK:
To build the production APK, use the specific command for the prod build:
- Build the development APK:
To build the development APK (if you need a debug APK for the dev version), use the specific command:
Notes
- The
yarn androidcommand will always build the APK for development (devDebug), with thedevflavor. This command is suitable for testing and continuous development. - To compile the production or development APK, use the commands
yarn android-build:prodoryarn 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.