Java is also an island. That's the title of a legendary Java reference book, common in German-speaking countries. My high school teacher used to read in it during our CS classes, I've never dared to touch that massive book when I was that age, and nowadays, I'd rather use Stackoverflow. Nonetheless, the title has impressed itself on me.
After school, I've never used Java again for any serious applications, there was no need on my journey as a Fullstack JS dev. But a week ago, this was to change: I needed access to the low-level primitives of the Android Camera API, to shoot latency-free images from our hybrid native app. In addition to that, we also need to communicate with an external GPS device which is connected via an OTG cable to the phone.
A native plugin was the only viable solution to that problem, as everything has to be as latency-free as possible, for perfectly precise GPS position data in the JPEGs metadata (we are talking about < 1cm here). That's where the journey back into the forgotten lands of Java has begun: And surprisingly, the switch wasn't that difficult at all. As I was writing TypeScript for the last 2.5 years nearly every day, it took me just a few hours to get back into Java development. The harder part was re-learning about the Android platform and its APIs, plus the fact that writing Cordova plugins is a real pain. But after paving my way through the endless Android docs and comparing all possible Camera API libraries performance-wise, I managed to accomplish the task and decided to open-source the plugin as part of the Hacktoberfest.
So, that's the short story of my voyage into the exciting lands of Java. And I must say, I didn't dislike it at all, although the DX of my go-to stack is much better, it was a welcome diversion.
Top comments (0)