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
- Clone the repo
git clone https://github.com/your-org/your-mobile-app.git cd your-mobile-app
- Install dependencies
npm install # or yarn install
Running the App
- Start Metro bundler
npm start # or yarn start
- Open in Expo Go
- 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.
- Choose Tunnel or Local mode if prompted.
- Run in Simulator
- Press
i
(iOS) ora
(Android) in the Metro terminal.
- Press
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
-
Install Java 17 (OpenJDK)
choco install -y microsoft-openjdk17
This provides the JDK Android Studio needs.
-
Download & install Android Studio — be sure to keep the Android Virtual Device (AVD) component checked during setup.
-
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.
-
Find your SDK path Settings → Languages & Frameworks → Android SDK shows the Android SDK Location, copy it.
-
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.
-
Verify ADB Open PowerShell and run
adb --version
; seeing a version string confirms the tools are on your PATH. -
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.
-
Launch the emulator In AVD Manager press the Play ▶️ button to boot your new emulator.
-
Start Expo’s dev server
npx expo start
This brings up the Terminal UI with a QR code and hot‑keys.
-
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!