2.1 KiB
2.1 KiB
Android Setup Guide
Option 1: Use Physical Android Device (Recommended)
Steps:
-
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"
-
Connect device via USB:
# Check if device is detected adb devices -
Run the app:
cd flutter_siab_app flutter run
Option 2: Use Android Emulator
Install Android Studio:
-
Download Android Studio: https://developer.android.com/studio
-
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
-
Start the emulator:
# List available emulators flutter emulators # Launch emulator (replace with your emulator name) flutter emulators --launch <emulator_id> -
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 devicesto 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.