The Android Studio IDE can be downloaded here. Normally, you can either build the app using Java or Kotlin for the back-end, and using XML for the front-end.
The essential folders and files are:
.
├── app
│ ├── src # The main directory for the source files.
│ │ ├── main # Contains the primary code and resources.
│ │ │ ├── AndroidManifest.xml # Configures the app's name, icon, and permissions.
│ │ │ ├── res # Resources folder containing layouts and other UI elements.
│ │ │ │ ├── layout # Holds XML front-end files defining the user interface.
│ │ │ │ │ ├── biner_base.xml # XML layouts for HSV segmentation activity.
│ │ │ │ │ ├── activity_reference_input.xml # XML layouts for taking input from the user.
│ │ │ │ │ ├── camera_view.xml # XML layouts for the main activity.
│ │ │ ├── java/.../na568Teamproject_MohammedAlanUsmanBahru/ # Java back-end source code directory.
│ │ │ │ │ │ ├── SeekBarHsvSeg.java # Manages the user interface for a feature involving an HSV color model.
│ │ │ │ │ │ ├── ReferenceInput.java # Handles user input for reference settings.
│ │ │ │ │ │ ├── MainActivity.java # The main activity managing the core functionality.
│ │ │ │ │ │ ├── NoiseEstimator.java # Manages noise estimation for sensors and updating noise parameters.
│ │ │ │ │ │ ├── KalmanFilter.java # Implements a Kalman filter for estimating and updating the state.
└── ...
For running the app via Android Studio, this application uses the following libraries:
- Download or clone the repository.
- Open this 'android_app_team16' project in your Android Studio IDE. Check and click "Trust Project".
- In the Menu Bar try:
Build → Rebuild Project. - If the build is successful:
- In your Android device, turn on the USB debugging:
Settings → About phone → tap Build number x 7 times → allow for being developer → go back to Settings → Systems → Developer options → scroll down → turn on USB debugging. - Connect your Android device to your computer via USB cable.
- In the Android Studio IDE press Run (or pressing control+R) button at the top of the window.
- In your Android device, turn on the USB debugging:
- If the build is not successful:
- Download OpenCV for Android dependency and extract it.
- In the Android Studio IDE:
- Load the dependency
File → New → Import Module → Browse → OpenCV-android-sdk (the OpenCV dependency you have extracted) → sdk → click Open button → change module name e.g.: opencv → click Finish - Link the dependency
File → Project Structure → Dependencies → in Modules click app folder → click + (add dependency) in Declared Dependencies → click 3 Module Dependency → checkmark opencv → click OK → if there is Modules other than app and opencv (e.g.: opencv2), please remove it by clicking - (Remove Module) and 'yes' button → click OK. - Configuring the app build.gradle file
at the leftmost side menu make sure that Project tab is activated → in the dropdown arrow at the top left IDE window click Project → extend app by clicking at the arrow → click and open build.gradle in app directory → remove the line of implementation project(path: ':opencv2') but keep implementation project(path: ':opencv') → click menu bar File → Sync Project with Gradle Files. - After sucessful, do the step in the point 4.
- Load the dependency
- Modify and develop the Android app, commonly by modifying code in Java and XML directories.
Thank you