Skip to content
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

Support Gadgetbridge Canned Responses #3556

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

WhelanB
Copy link
Contributor

@WhelanB WhelanB commented Sep 3, 2024

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:

  • Add a "disp(lay)" field to the 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 bytes
  • Expand the Android integration app to listen for a canned_responses_sync message, and write the data contained within that message to the replies.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:

image

@thyttan
Copy link
Collaborator

thyttan commented Sep 7, 2024

Changes to android integration app, calling @gfwilliams!

apps/reply/lib.js Outdated Show resolved Hide resolved
@gfwilliams
Copy link
Member

Thanks! Nice idea about including emoji/etc.

I'm a bit concerned about the truncatedDisplayString being an array (see comment) but apart from that this looks good.

@gfwilliams
Copy link
Member

Great, thanks!

@gfwilliams gfwilliams merged commit 6f8871c into espruino:master Sep 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants