Closed michaelrhughes closed 3 years ago
Awesome PR. I had to find some time to digest this but really appreciated your work!! Thank you!!
Do we know if this awesome PR is going to get accepted any time soon?
Oh my goodness I completely forgot this. Merged.
This is a big one 😄
My wife's device keeps on pairing and I have to run upstairs to pair my footpod 🤣. To support multiple ANT+ devices I needed to do a lot of refactoring. If you feel this should be a fork instead of a PR let me know. Normally I would do this in a series of smaller PRs but I was low on time for this one.
Motivations for this PR:
Service
is killed when the Android task is killed. It felt more intuitive to have aStop
button in the notificationDisclaimers:
New Code Organization:
Activities
/Fragments
/Service
just manage lifecycle, UI and communication between componentsservice/ant
- has all ant specific codeservice/ble
- has all ble specific codeAntToBleBridge
- manages the communication between the twoAdding a new Sensor
To add a new sensor you should be able to: 1) Add a new
AntDevice
, Add a newAntDeviceConnector
2) Add a newBleServiceType
with all the BLE specific stuff, add it to the list ofserviceTypes
3) Hook the two up betweenAntToBleBridge
4) No need to add UI or worry about lifecycle of Pcc or BLEScreenShots
You can see only one of the Stride SDM devices is broadcasting to BLE right now:
The updated Stop button: