Support Gadgetbridge Canned Responses #3556
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I realised during development of the "reply" library that Gadgetbridge contains support for setting canned responses/replies directly through the app, which is preferable to customising via
interface.html
as it can support emojis/Unicode using text as bitmaps.This PR consists of 2 main changes:
replies.json
file used by the reply lib. If display is set for a particular canned reply, it will be shown on the menu instead of the default "text" field, which is what is sent to Gadgetbridge as a response. This way, the "disp(lay)" field shown on the watch can contain image representations of emojis and other Unicode characters, while the reply to Gadgetbridge contains the raw Unicode bytescanned_responses_sync
message, and write the data contained within that message to thereplies.json
file used by the reply lib. I'm planning to open an additional PR against Gadgetbridge on CodeBerg to send this message when canned responses are set: