Skip to content

Commit fc94481

Browse files
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

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# android
2+
android/*.iml
3+
android/.gradle
4+
android/local.properties
5+
android/.idea/caches
6+
android/.idea/libraries
7+
android/.idea/modules.xml
8+
android/.idea/workspace.xml
9+
android/.idea/navEditor.xml
10+
android/.idea/assetWizardSettings.xml
11+
android/.DS_Store
12+
android/build
13+
android/captures
14+
android/.externalNativeBuild
15+
android/.cxx
16+
android/local.properties
17+
18+
# Arduino
19+
firmware/build/
20+
*.bin
21+
*.elf
22+
*.hex

android/.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/.idea/AndroidProjectSystem.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/.idea/compiler.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/.idea/deploymentTargetSelector.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/.idea/gradle.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/.idea/inspectionProfiles/Project_Default.xml

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/.idea/migrations.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/.idea/misc.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)