Mobile Documentation - bounswe/bounswe2025group5 GitHub Wiki

Mobile App Setup & Usage

Prerequisites

  • Node.js v14+ (LTS recommended)
  • npm or Yarn
  • Expo CLI
    npm install --global expo-cli
    
  • Expo Go (iOS / Android) — install from App Store or Play Store

Project Installation

  1. Clone the repo
    git clone https://github.com/your-org/your-mobile-app.git
    cd your-mobile-app
    
  2. Install dependencies
    npm install
    # or
    yarn install
    

Running the App

  • Start Metro bundler
    npm start
    # or
    yarn start
    
  • Open in Expo Go
    1. Scan the QR code in your terminal with the Expo Go app. The same Wi-Fi network (not eduroam though, since it creates some issues) should be used for both devices.
    2. Choose Tunnel or Local mode if prompted.
  • Run in Simulator
    • Press i (iOS) or a (Android) in the Metro terminal.

Key Dependencies

  • expo-router — file-based routing
  • react-native-async-storage — persistent storage
  • expo-font + expo-splash-screen — custom fonts & splash handling
  • react-native-reanimated — animations
  • @expo/vector-icons — icon set

Troubleshooting

If you run into build or version errors (e.g. “Module X not found” or “Incompatible version”), it usually means one of the libraries didn’t install with the correct React Native or Expo–SDK–compatible version. In that case, just re-run:

expo install <package-name>

Emulator Setup Using Expo Go

Step‑by‑step checklist

  1. Install Java 17 (OpenJDK)

    choco install -y microsoft-openjdk17
    

    This provides the JDK Android Studio needs.

  2. Download & install Android Studio — be sure to keep the Android Virtual Device (AVD) component checked during setup.

  3. Open SDK Manager

    • SDK Platforms . Here, tick the latest Android API level.
    • SDK Tools . Tick Android Emulator and at least one Android SDK Build‑Tools version, then Apply.
  4. Find your SDK path Settings → Languages & Frameworks → Android SDK shows the Android SDK Location, copy it.

  5. Set environment variables

    • Create a new user variable ANDROID_HOME that points to that path.
    • Append %ANDROID_HOME%\platform-tools (and %ANDROID_HOME%\emulator if you like) to your Path variable.
  6. Verify ADB Open PowerShell and run adb --version; seeing a version string confirms the tools are on your PATH.

  7. Create a virtual device Android Studio ➜ More Actions → Virtual Device Manager → Create device Pick a device profile (Pixel is fine), download a system image (latest Recommended), then Finish.

  8. Launch the emulator In AVD Manager press the Play ▶️ button to boot your new emulator.

  9. Start Expo’s dev server

    npx expo start
    

    This brings up the Terminal UI with a QR code and hot‑keys.

  10. Open the app on the emulator With the emulator running, press Shift + A (or just A if there is a single target) in the Expo Terminal UI to install and launch your project inside the virtual Android device.


That’s all you need to get the mobile client up and running. Happy coding!