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

Proposal: creating a modern android app that functions via push notifications and supporting it #17

Open
NathanC opened this issue Nov 3, 2022 · 3 comments

Comments

@NathanC
Copy link

NathanC commented Nov 3, 2022

I just set up my homeserver, and having SMS bridging is a critical feature for me. The provider linked in the documentation hasn't been touched in two years, has no documentation in the repo, and uses a local server. I'd like for my phone to constantly bridge SMS, regardless of if I'm on my home or mobile network. I think now is the critical time to support this, with Signal recently announcing they are dropping SMS support. I am migrating off of Signal (and have already set up the signal bridge) specifically because of it.

I'm intending to write my own android app, likely react native with native modules. It will be configured to push SMS/MMS to a domain, based on some protocol, and receive/be notified of messages via Expo or FCM push notification tokens. The bridge will need to be updated to understand it, and to store the push token for the app.

Core features I want to support (not sure which of these are new, please let me know):

  • Synchronizing my phone's contact book to create display names for the users (with an "SMS" suffix)
  • adding users to an SMS Space (with an icon)|
  • MMS
  • group messages as rooms
  • support for interpreting those annoying "so and so has liked your message" messages from iMessage as reactions
  • support for sending images, ideally stickers, and potentially voice messages
  • potential support for publishing reactions to messages as "so and so has liked your message)
    • still potentially annoying, but hey, Apple did it first and we should encourage people to move to saner/more open messaging platforms

Notably, MMS messages can be too large to send in a push notification, so the push would just have to notify the client that a new message is ready, causing it to request from the server (which would need to maintain a queue of some sort).

Alternative patterns:

  • having the phone app register at a matrix client to get bidirectional communication with the bot-- it would send messages to the bot in a private room, and the bot would forward them to the appropriate room. Not sure if this is a good pattern though.
  • having the server link in with a twilio account, and communicate with the phone app via SMS. Those SMS messages would get proxied-- cons: complexity + twilo cost, pros: would work even without mobile data enabled
  • (stretch goal, but would be awesome) contributing to element or schildiChat to act as this android app automatically, providing native SMS support out of the box, and seeing if we can get matrix.org to support this bridge. Could be great for adoption, and perhaps we could even find a way to use it for providing contact discovery on element on phones (i.e., seeing which of your friends has a matrix account).

I'm going to dig through the code more and look into the provider interface, but I'd appreciate someone knowledgeable about this who is willing to answer some questions/brainstorm with me. I'm not knowledgeable in Kotlin, and honestly am tempted to just rewrite this from scratch in TypeScript in a way that matches my vision for it, but I don't want to reinvent the wheel. What level of effort do you think it would be to update this project to support this new type of provider?


I know this will be a fair amount of work, but I'd really like to do this. Any info/help is appreciated.

@benkuly
Copy link
Owner

benkuly commented Nov 3, 2022

Thank you for this proposal and you interest to contribute to this project 🙂 Before you put too much work into it, maybe https://gitlab.com/beeper/android-sms could be a solution.

At the moment I've not much time for this bridge. I wanted to move it away from Spring Boot to Ktor and it needs to be updated to the new Trixnity version. Spaces is also something I wanted to support. But at the moment it is too much work for me and for now this bridge "just works" for one of my clients.

@NathanC
Copy link
Author

NathanC commented Nov 3, 2022

Yeah, I've learned about android-sms recently and plan to look deeply into it, no use reinventing the wheel.

Would you mind if I messaged you on Matrix sometime to get a brief overview of the arch of this bridge and some of the challenges/lessons you learned from creating it? It sounds like, if I can't use android-sms or need to make a lot of custom changes, doing it from scratch vs using this repo is probably the right approach, but I'd love to learn from your experience with it.

@thibaultmol
Copy link

@NathanC any updates?

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

No branches or pull requests

3 participants