User Agent Detection in Java
I was looking for a way to detect mobile devices in Java and hoping someone had done the heavy lifting for me. It turns out someone had. There’s a port of a PHP script I found at Hand Interactive that looks like it does what I need.
Basically if I detect a mobile device I want to use a different stylesheet on Quote Crate but I didn’t want to have to find all the user agent strings myself. This should work nicely. I’ve loaded the file into a Gist on Github and plan to make some improvements to it.