Commit fc94481
committed
feat: Implement First Version
This commit introduces the core functionality for discovering, pairing, connecting with and controlling the ESP32 "Remote Switch" device. 1. BLE scanning 2. device bonding 3. help page 4. BLE connecting 5. on/off control
- Add BleScanManager to handle BLE scanning logic, filtering by the device name "Remote Switch".
- Implement runtime permission requests for Bluetooth and Location (ACCESS_FINE_LOCATION, BLUETOOTH_SCAN, BLUETOOTH_CONNECT) to comply with Android 10.0+ requirements.
- Add a BroadcastReceiver to listen for bond state changes and update the UI accordingly upon successful pairing.
- Utilize SharedPreferences to persist the MAC address of the bonded device, allowing the app to remember the device across sessions.
- Implement a "Reset" feature to unbond the device via reflection and clear the saved address from SharedPreferences.
- Create a help page to list some instructions and give an access to navigate to the permission settings.
- Add BleConnectManager to handle BLE connecting and command control logic, including time sync and servo control.0 parents commit fc94481
58 files changed
Lines changed: 2436 additions & 0 deletions
File tree
- android
- .idea
- inspectionProfiles
- app
- main/java/com/example/remoteswitch
- src
- androidTest/java/com/example/remoteswitch
- main
- java/com/example/remoteswitch
- ui/theme
- res
- drawable-v24
- drawable
- layout
- mipmap-anydpi-v26
- mipmap-hdpi
- mipmap-mdpi
- mipmap-xhdpi
- mipmap-xxhdpi
- mipmap-xxxhdpi
- values-night
- values
- xml
- test/java/com/example/remoteswitch
- gradle
- wrapper
- firmware
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments