-
-
Notifications
You must be signed in to change notification settings - Fork 389
Feature/bluetooth connection #854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Feature/bluetooth connection #854
Conversation
|
I think a thinner circle might look better for the battery life, let me know what you think. It may also look better if you rounded the ends of the colored segment. If you want to use unsandboxed apis, you can update the BoringNotchXPCHelper to make those calls for you, which allows the app to remain sandboxed. If the current solution is working fine, then no need but thought I would point it out. This is being utilized by the HUD already. For custom symbols, I think the storage increase is definitely worth it, unless it really adds a lot of extra size to the app. The user experience is the most important thing, there is no need to save a few MB of storage space here imo. |
|
Okey these are some really good feedback thank you. Did some improvements based on your feedback.
|
|
For the ring, if you divide the percentage by 102 instead of 100, it should make a full ring at 100% instead of the current 98%. |
|
I think the code architecture could use some work. Ideally you would have data model(s) with fields for the different properties of bluetooth devices. And then its probably best to also split up the bluetooth discovery code from the battery code as well, and maybe icon can be its own thing as well. We also need a better way to manage the live activities but that's on me to implement. I think we should wait to merge this until I get that done. |


Implemented Bluetooth Live Activities using IOBluetooth
Live Activities
Live activities will be shown when a device connects or disconnects.
Connection displays device type on the left and battery percentage on the right with changing colors depending on the percentage (0=red -> 100=green)
MajorClassandMinorClassSneak Peek
Sneak Peek is available and can be toggled on/off with 2 different styles, Default and Inline; similar to Media Sneak Peek
More Examples
Settings
Notes
Any feedback is welcome.
IOBluetooth is somewhat inconsistent with device information. I have failed to gather battery information consistently on multiple devices and finally I've decided to use
pmset -g accpscommand and captured the output to display battery percentages.Device classes are similar stor. Some devices I've tried did not broadcast class info so I opted for name matching and finally custom images so that users can anter a keyword and set a custom image for their unrecognized devices. I've initially used
system_profiler SPBluetoothDataTypecommand output to gather deviceMinorClassbut realized app needs to be un-sandboxed for this command to give output inside an app so I just scraped it as I think it was not worth to un-sandbox this app just for this.Tried to keep it lightweight its all event driven by Notifications. Only polling is for battery levels when a device connects to wait for
pmset -g accpsoutput to refresh and that timeouts after 2 secondsIssues