Category: android

Android: Retrieve JSON from service via DNS SRV lookup

Quick snippet of code for anyone in need of an SRV lookup example. If your apps retrieve data from a service and you’re hard coding a URL, DNS is a great way to make that more dynamic. DNS Java is the library being used here (http://www.dnsjava.org/doc/). private static class ConfigUpdater extends AsyncTask<Void, Void, JsonConfig> { private static final String SRV_RUE_CONFIG_PREFIX = “_rueconfig._tls.”; ConfigListener listener; String request_url; String query_url; String username, password; String errorMsg; public ConfigUpdater(String url, String username, String password, ConfigListener listener) { this.username = username; this.password = password; this.listener = listener; query_url = SRV_RUE_CONFIG_PREFIX + url; errorMsg = “Failed...

The iOS accessibility feature that should be dead simple for developers but isn’t

Android just knows what your system font setting is. If you have trouble seeing smaller text, it will automatically scale your TextViews according to what you’ve told it to do in settings. iOS developers need to give their views a little extra love. Short, simple, and to the point here at 1am just for you. No digging or stackoverflow required. Objective-C – How to scale labels according to iOS system settings: UIFont *CELL_FONT = [UIFont systemFontOfSize:[UIFont preferredFontForTextStyle:UIFontTextStyleBody].pointSize]; if (CELL_FONT) { self.labelView.font = CELL_FONT; }

PUC – Personal Universal Communicator

Once again, Christmas has come and gone. I’ve been working all year to deliver on the Universal communications app aimed at not just the accessibility community but to everyone. We want the PUC project to be the end all be all for communications. We have so much room to improve (who doesn’t?) but we want to share our work with the world. From being one of the first to implement the new FCC mandated real time text, to high quality video, HD voice, multi-media messaging and more, PUC is the ultimate communications platform. Having been the Sr. Software Engineer for...

Raspberry Pi’s, Photons, and the magical world of Computer Engineering

Very often we can find ourselves in a career rut no matter the industry. We do the same things, learn similar skills to what we know, and are far too frightened to branch out to try something new. As a means of fighting complacency I’ve wanted for a long time to jump into the world of microcontrollers / hardware, but there has always appeared to be such a high barrier to entry. This article is for the Software Engineer who has been unsure of the hardware world but has an interest in giving it a go. My goal though this...

Android Project: Fork of Google “Meter” live wallpaper

Though I’m still working full time I couldn’t help but get my hands dirty with some code over our Christmas break. I wanted to create something I would use on a daily basis as well as have that “cool factor.” Thus spawned the idea of modifying Google’s data centric live wallpaper “meter” for Android. My fork currently adds a settings page that can be configured to do a GET from two URL’s and display that information atop of your Android Desktop. My initial use case for this is to display system status from my office and home Macbooks such as...

Android + iOS Tool: Calaba.sh – Automated BDD UI Testing

When developing mobile applications with a large team, especially on open source projects, it is essential to ensure your UI is being automatically tested. Not only will this prevent commits that break UX, but will also save time and make things easier for your developers. Calabash does this by using Cucumber scripts (Plain text user stories) to automate button presses, text inputs, and will even tell you if a particular String appears on your screen. In fact, you don’t even need to be a developer to write a Calabash script. For example, a calabash script to test renaming a note:...