Files
SIAB-Scale/ANDROID_SETUP.md
2026-09-17 08:26:27 +07:00

2.2 KiB

Android Setup Guide

Steps:

  1. Enable Developer Options on your Android device:

    • Go to Settings > About Phone
    • Tap "Build Number" 7 times
    • Go back to Settings > Developer Options
    • Enable "USB Debugging"
  2. Connect device via USB:

    # Check if device is detected
    adb devices
    
  3. Run the app:

    cd flutter_siab_app
    flutter run
    

Option 2: Use Android Emulator

Install Android Studio:

  1. Download Android Studio: https://developer.android.com/studio

  2. Install Android SDK and create an emulator:

    • Open Android Studio
    • Tools > Device Manager
    • Create Virtual Device
    • Choose a device (e.g., Pixel 5)
    • Download a system image (API 30+ recommended)
    • Finish setup
  3. Start the emulator:

    # List available emulators
    flutter emulators
    
    # Launch emulator (replace with your emulator name)
    flutter emulators --launch <emulator_id>
    
  4. Run the app:

    cd flutter_siab_app
    flutter run
    

Option 3: Build APK and Install Manually

If you can't use USB debugging, build an APK:

cd flutter_siab_app
flutter build apk --release

The APK will be at: build/app/outputs/flutter-apk/app-release.apk

Transfer to your Android device and install it.

Troubleshooting

"No devices found"

  • Ensure USB debugging is enabled
  • Try different USB cable/port
  • Run adb devices to verify connection
  • On Linux, you may need to add udev rules

"Permission denied"

  • Check USB debugging authorization on device
  • Try adb kill-server && adb start-server

Bluetooth not working on emulator

  • Physical devices are recommended for Bluetooth testing
  • Some emulators don't support Bluetooth BLE
  • Use a real Android device for best results

Required Permissions

The app needs these permissions (already configured):

  • Bluetooth
  • Bluetooth Admin
  • Bluetooth Scan
  • Bluetooth Connect
  • Location (required for BLE scanning on Android 12+)

Make sure to grant all permissions when the app requests them.