Make installable share target on Android#24
Conversation
leonhandreke
commented
Jul 22, 2025
- Use newer version of x/canvas that supports Deno >= 2
- .gitignore deno.lock
- Serve printi page on /
- Set API server URL from request or reverse proxy
- Implement installing from Chrome and sharing from Android
- After first printi sent, prompt to install share target on Android
- Set h1 from template rendering instead of JS
- Center that shit
This is good for several reasons: First, better DX, can run a local printi stack without too much hassle Second, serving out the manifest for fancypants sharing dialog on Android requires setting the right headers, and GitHub can't do that.
1a6f6c5 to
341e906
Compare
|
Yeah, it works and it's cool. Sometimes the commit messages contain more info on why I did something. I also added Docker things. Can now run with I'll take a look at the tests later... |
341e906 to
d8903e1
Compare
|
I also thought a bit about how to make the share targets a bit more distinctive. We could easily render a per-printer banner.svg with a (stable) color from a pastel color palette (I think every messenger app does this). Merlijn also suggested emojis. I thought this could really be a good machine learning usecase, picking the right emoji for a printi. But then we need a database urgh... |
|
OMG SOOO GOOOOOODDDDD |
|
Yehehhhhhh |
|
Creating a banner.svg is super cool! I really like the idea of a stable color from a palette! Like a "hash" function that outputs a hue? I did that for the outline colors in https://featured.plutojl.org/ |
|
So now instead of https://api.printi.me/ (hosted with Deno on digitalocean) and https://printi.me/ (hosted with github pages from https://github.com/fonsp/printi-static) we just have a single server for both on the same domain, right? I like it! I'll give you access to digitalocean so you can mess with it, feel free to use something different also. I like deno deploy but it would also be nice to use something simple and less amerikaans |
|
So each printer page installs as its own app, right? And different printers show up in the Share panel as separate "apps" that you can share with? I like it! |
Yes! I also thought about making it install one app that then takes you to a page where you can share to one or more printis (I think Snapchat does this). WDYT? we could keep your favorite printis in local storage. |
|
Both are fine! |


