printi icon indicating copy to clipboard operation
printi copied to clipboard

Make installable share target on Android

Open leonhandreke opened this issue 4 months ago • 10 comments

  • 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

leonhandreke avatar Jul 22 '25 23:07 leonhandreke

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 docker compose up --build api. Let's talk about how to host this in the future. Need to get rid of that github.io setup (it did not support serving the web manifest).

I'll take a look at the tests later...

leonhandreke avatar Jul 22 '25 23:07 leonhandreke

Screenshot_20250723-104118 Screenshot_20250723-005532 Screenshot_20250723-005544

leonhandreke avatar Jul 23 '25 08:07 leonhandreke

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...

leonhandreke avatar Jul 23 '25 08:07 leonhandreke

OMG SOOO GOOOOOODDDDD

fonsp avatar Jul 28 '25 09:07 fonsp

Yehehhhhhh

fonsp avatar Jul 28 '25 09:07 fonsp

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/

https://github.com/fonsp/Pluto.jl/blob/118b3a64ba8bf54ea23768684501644ba20af71a/frontend/components/welcome/FeaturedCard.js#L8

fonsp avatar Jul 28 '25 09:07 fonsp

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

fonsp avatar Jul 28 '25 09:07 fonsp

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!

fonsp avatar Jul 28 '25 10:07 fonsp

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.

leonhandreke avatar Jul 28 '25 13:07 leonhandreke

Both are fine!

fonsp avatar Jul 29 '25 11:07 fonsp