How to print from Android to CUPS (running on another computer in the LAN)?
(CUPS (Common Unix Printing System/Server) is of course already set up to accept requests over the LAN.)
Preferably, without relying on proprietary software.
I have recently released an Android app based on (a modified) version of Cups4J. Communication is via http/https. The main thing I had to/opted to change from the java library was a dependency on JAXB for XML processing (a. I felt it too heavy b. Android does not have this javax lib and importing it apparently involves repackaging) relying instead on some hard coding.
You can now set up CUPS for IPP Everywhere. It should then directly show up in your Android, Chromebooks, and maybe even iPhone printer menus. The other answers are outdated for reasonably new systems: CUPS 1.5+ and Android 4.4+ or an IPP Everywhere printer is required. For Apple AirPrint CUPS 2.2.2 is required. Debugging the functionality can be a bit difficult though.
I have a USB printer attached to a Windows machine and my Linux server sees that over SMB and publishes that via CUPS (be sure to "share...".)
For Android, there's Let's Print Droid - complete with a print service so all apps see it. It takes about two minutes to set up.
As already stated in other answers, the android system printing service can already access to cups printer (at least for android 10).
These are the steps I had to follow to make it work with debian buster since CUPS was not configured to accept LAN requests in my case.
On debian buster
Steps were taken from Sharing via Internet Printing Protocol @ wiki.ArchLinux.org
/etc/cups/cupsd.conf so that your CUPS / is reachable from a local network address
<Location /> Order allow,deny Allow localhost Allow 192.168.0.* </Location> ...
/etc/cups/cupsd.conf either one of these ways
3a. so that your CUPS listens to the address at wich you call it
... Listen <hostname>:631 ...
3b. so that your CUPS listens to port 631 (whatever the address at wich you call it) remove the
Listen localhost:631line and add this one [3b. works better for me, since after a reboot, the solution 3a. didn't make the cups server reachable from anything else than localhost]
... Port 631 ...
# systemctl restart cups
On an Android 10 phone (mine is xiaomi with miui 11)
It seems there are no native Android CUPS clients, which are free software.
The only way that can be found is rather clumsy, via a Debian installation on the Android device -- http://code.google.com/p/android/issues/detail?id=1148#c41. But using a Debian (or another distro) installation like LilDebi (for example) would definitely require root (in order to chroot)! That's not convenient for those who don't want to root the device (just to be able to print). (BTW, aren't there, besides chroot, any more modern alternative isolation technologies implemented in Linux that wouldn't require root?.. Perhaps, LXC?)
Another app (Remote CUPS) requires SSH access to the server.
ObPrint doesn't appear to be open-source.
Let's Print Droid likewise doesn't appear to be open-source.