sharandac / My-TTGO-Watch

A GUI named hedge for smartwatch like devices based on ESP32. Currently support for T-Watch2020 (V1,V2,V3), T-Watch2021, M5Paper, M5Core2 and native Linux support for testing.
GNU General Public License v2.0
523 stars 247 forks source link

Interesting Pull request for Gadgetbridge #381

Closed Crsarmv7l closed 1 year ago

Crsarmv7l commented 1 year ago

Came across this pull request on gadgetbridge https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2924

Which would allow them to start using: https://developer.android.com/reference/android/companion/CompanionDeviceManager#startObservingDevicePresence(java.lang.String)

Which in turn may allow for the use of periodic wakes on the TTGO T-Watch, which would improve battery life.

Crsarmv7l commented 1 year ago

Following up on this. Looks like the pull was merged here

https://codeberg.org/Freeyourgadget/Gadgetbridge/commit/0dd0b2beadd7a7172437aa77a122f521ce7c0df4#diff-a0b960e906cfbdd5845e7395aed15198e4c62768

In this file: https://codeberg.org/Freeyourgadget/Gadgetbridge/src/commit/0dd0b2beadd7a7172437aa77a122f521ce7c0df4/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btle/BtLEQueue.java

I wonder if we could abuse the mPauseTransaction by setting it to true on disconnect...

Crsarmv7l commented 1 year ago

@sharandac it's happening! Gadgetbridge cached notification pull here!

https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3094

sharandac commented 1 year ago

Yeah!