this post was submitted on 17 Jul 2023
22 points (92.3% liked)
Connect for Lemmy App
2768 readers
11 users here now
A community for the mobile app Connect for Lemmy.
Links
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I think this is more complex to achieve in a clean manner than we think.
Since the system is federated, which URLs are considered an instance need to either be hardcoded (if you want only links to those to be intercepted as a URL handler) since the Android permission system only allows these to be defined during compile time;
or you make the app intercepts all https://* websites, basically how a web browser would request permissions to capture all these domains, but then if you tell Connect to always open these links and it's not a Lemmy website, things will start to break down.
Can it be configured to intercept but not launch the app automatically? I'm on Android using the DDG Private Browser and can manually open in the app or use the browser. Is it application or browser dependent?
Unfortunately, without a proper way to open all instances of Lemmy in an app, this will deter some from this platform.
The only way I can see a federated system like this to open links reliably and constantly would be to avoid dealing with hostnames, and instead define a protocol handler.
Similar to how email client works. You email client is set-up with your mail provider, and the OS will handle the protocol and pass that info to the client
ie:
mailto:[email protected]?subject=Hello&body=Test
will make your email client make a new email to be sent to[email protected]
, with the TitleHello
andTest
as the email's body.Something for Lemmy could be make such as
lemmy://[[email protected]](/c/[email protected])
to make you open that community in the Lemmy app of your choice. The syntax and parameters could be different than what email defines, I'm just setting an example. Parameters could be made to send a DM to another user, set up filters, sort order, etc.Using a protocol handler would make home instance irrelevant and redirections wouldn't be necessary, as the client/app would do all the heavy lifting.