I passed the latitude and longitude values as arguments into the constructed Dark Sky JSON call, along with the API key that Dark Sky issued me when I requested a developer test account, and made the call to the api.darksyapp.com server via Recon's WebRequestBundle method :

I ran the response string received from Recon's SDKWebService onComplete method through the JSON library, parsed for the hourSummary and daySummary strings, and set the text in the appropriate TextView control:

The current temperature, forecast, and latitude/longitude results show up in the main window. I also remembered to disable the Android titlebar via the android:theme=@android:style/Theme.NoTitleBar.FullScreen directive in the Android Manifest file) using Recon's recommended Eurostyle 24 sp typeface (though Recon says this is being deprecated for Google's Droid Sans font in the next release) for easy reading:

Note that I did not have to add an "android.permission.INTERNET" permission to the manifest, since Recon's WebAPI proxies through the Bluetooth connection via a pre-released developer's build of Recon's HQ Mobile application, required to run on the host's Android smartphone. This network-proxy-capable pre-release build of HQ Mobile will be made available on the Google Play marketplace once Recon has fully tested it with its development partners.

Finally, I polished off the app with its own square 245x245 pixel icon. And voilà, a new MOD Live app was born.

Running the Application

Because my Dark Sky-powered app requires an Internet connection to retrieve the latest forecast, I first had to pair the MOD Live with my Android smartphone via a Bluetooth connection. Then I had to execute Recon's MOD Live application on my phone. The app requires nearly every permission in the Android arsenal, so if you're paranoid about privacy or unauthorized data leakage, this may make you nervous. Yet unlike a lot of other apps in the Android Play store, Recon has explicitly spelled out in the application's description page which services are being used in the app and why they are necessary. Still, without the Recon app running on your phone, you will receive a "Paired but not connected" error if your phone has been associated with MOD Live via the Bluetooth connection, but you don't have the Recon MOD Live app running as a service on your phone.

Assuming these dependencies are met and you have had the MOD Live powered on long enough to obtain a GPS lock, scrolling through the icon menu and selecting the app to launch it should submit the latitude and longitude to the Dark Sky Web service and display the next hour's weather conditions on the HUD.

Figure 6: The running MODLive Dark Sky API assisted application.

Improving the Application

Time permitting, I would improve the application by iconifying the results rather than making the user read the resulting forecast text. For example, if snow was expected in 20 minutes, I would display a snowflake icon followed by the number 20. That number would count down with each passing minute.

If the user needed more forecast details, I could provide two additional screens, accessed via the right and left remote buttons. These screens would show extended forecast data such as "next three hours" and "next 24 hours," while the second detail screen would call upon national weather service maps of the area for an up-to-date precipitation snapshot.

A few more graphic accoutrements such as better icons and graphic layouts along with friendlier error trapping for network connection problems would also need to be added before considering submitting such an app to Recon for inclusion into their upcoming MOD Live online app store. And yet, the key takeaway from building an application for the MOD Live platform is how the whole user experience needs to be accounted for when building HUD-based Android applications. As the MOD Live design guidelines recommend, HUD apps should only require a split second of attention to impart the data feed to the user. Any longer than that will negatively impact the user experience.

The MOD Live Developer Experience

I have used a number of HUDs in the past, ranging from proprietary embedded OSs to ones connected to a Windows CE hip pack, and each suffered from the problem of discomfort after 10 minutes of use. This discomfort manifests itself in the form of a headache either from eyestrain, the weight of unbalanced gear strapped on the head, or both. Remarkably, Recon Instruments has alleviated these problems by keeping the HUD below eye level, intended for quick glances. By combining the HUD hardware with a comfortable pair of well-cushioned, well-balanced ski goggles, the HUD's weight is equally distributed across the goggles so that the HUD's added mass is negligible. But the fact remains that HUDs in general are still a bit intrusive and will have to be further miniaturized to enter the realm of mass consumer adoption.

Nevertheless, for very specific present-day user scenarios like traveling at high speed down a ski slope or furiously peddling through a mud-soaked BMX race track, a quick glimpse at performance data surely heightens the experience. The immediate feedback also helps correct in-flight errors and offers greater situational awareness compared to non-augmented activities.

For early adopting technology enthusiasts, the MOD Live platform today offers a far less expensive glimpse into the future of visual data field augmentation. Compared to the nebulous Google Glass early developer release that costs more than triple the price of the MOD Live (assuming you even qualify to eventually get your hands on Google's hardware), Recon Instruments offers an affordable glimpse into a post-smartphone world.

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task.
However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

This month's Dr. Dobb's Journal

This month,
Dr. Dobb's Journal is devoted to mobile programming. We introduce you to Apple's new Swift programming language, discuss the perils of being the third-most-popular mobile platform, revisit SQLite on Android
, and much more!