A quick (but useful) update to an oldie-but-a-goodie

One of the first apps I ever wrote for Android, and certainly the first app I published to the Google Play Store, was a simple unit converter app. (My god, that was nearly six years ago!) With over 150,000 loyal users, I’d say it’s been modestly successful, especially considering the hundreds of other similar utilities that exist on the Play Store.

Anyway, I thought it’s high time that this app receives some love, so I implemented a feature in the app that I’ve been wanting to make for quite a while: Widgets! You can now drop a widget right onto the home screen of your device, so that you can perform quick unit conversions on the home screen, without having to launch a separate app! You can also drop multiple instances of the widget, if you need more than one quick conversion. Here’s what it looks like:

The steps for putting a widget on your home screen varies for different Android devices, but generally it involves pressing-and-holding within an empty area of the home screen, and selecting from the “Widgets” menu. If you have the app installed, you should see a “Convert Units” widget that you can select and place on the home screen.

After placing the widget, you can configure which units it shows by pressing the “gear” icon on the left. You can then increment and decrement the value to convert by pressing the “+” and “-” buttons, or exchange the “to” and “from” units by pressing the widget itself.

The state of emulation on Android

For whatever reason, I have a strange fascination with emulators, and making sure that I can emulate as many machines and game consoles as possible on my current PC.

The one thing I haven’t researched until now is emulating various systems on my Android device. Now that I’ve received my shiny new Galaxy S7, I figured it must be powerful enough to emulate a good fraction of older hardware. And indeed, I was pleasantly surprised by the “state” of emulation on Android.  Emulators for NES and Super NES are readily available on the Google Play Store, along with emulators for Atari and Commodore 64, and hardly require the latest hardware to run well.

But what about emulators of  actual PC hardware? Well, there’s the excellent DosBox Turbo app, which is an optimized DosBox port to Android. This is not a free app, but it’s well worth it. However, what I was looking for is a true PC emulator, such as the great bochs emulator that I’ve trusted for a long time to boot into my disk images of Windows 3.1 and Windows 95. After a bit of looking, it turns out that this is available, too!

Thanks to  some fantastic work by Pelya (for porting the SDL 1.2 library to Android, thus  making it easy to port any SDL-based application to Android) and by  Lyubomyr  (for actually adapting bochs to use pelya’s SDL port), we now have a perfectly working version of bochs for Android! Using their build instructions, I was able to build my own bochs APK, load it onto my device, along with a few disk images. And after a few configuration tweaks, I’m now able to run my emulated images nearly flawlessly:

Here it is, running Windows 3.11:

…and Windows 95:

…and Windows XP:

And here it is running one of my favorite old DOS games, Return to Zork!

Planetarium app for Samsung Gear VR!

As a fun side-project during the last few weeks, I’ve been developing a planetarium application for the Samsung Gear VR headset (one of the neater gadgets I’ve gotten my hands on this year), along the lines of Stellarium or Google Sky Map. It’s pretty rudimentary so far, but nevertheless packs most of the features you would expect from a planetarium application, such as constellations, accurate planet positions based on current time, and a selection of Messier objects.

You can “look at” any object in the virtual night sky within the app, and see a pop-up description of its name. While looking at an object, you can also tap on the trackpad on the Gear VR device to retrieve a full description of the object from Wikipedia (using Wikipedia’s new RESTBase API, which I also help develop).

The app is not yet deployed to the Oculus app store (working on it…), but you’re welcome to check it out on GitHub and build it for your own device. Here are some screenshots:

View 3D MPO photos with Google Cardboard

One thing that I’ve been meaning to get my hands on is Google Cardboard, which  is an extraordinary bit of technology that transforms your smartphone into a virtual reality display, for the cost of just a few dollars! I love the simplicity of the concept, and I especially like how it repurposes existing features of the mobile device, specifically how it uses the magnetic field sensor to implement a sliding magnetic button. Anyway, I bought mine from Unofficial Cardboard:

While familiarizing myself with the Cardboard SDK, I realized that a perfect application for Cardboard would be to view .MPO photos taken by 3D cameras. So I created a minimal Android app that automatically searches your device for .MPO files, and displays them for viewing with Cardboard!  You can find the app on the Google Play Store, and the source code on GitHub.

A few notes about the app:

  • It automatically searches your phone’s internal memory and external SD card, but only up to two folder levels deep. For best results, place the .MPO files in the root directory of the memory card.
  • It creates a slide show out of all the MPO files that it finds. You may advance through the slide show by using the magnetic Cardboard slider control. It does not currently allow any customization of the slide show (excluding/including files, custom ordering, etc). Stay tuned…

Experimenting with Google’s Project Tango

Recently I had the opportunity to play around with Project Tango from Google:

I whipped up a quick demo, based on the existing sample code from Google, that takes the real-time point cloud provided by the depth sensor and “records” it into a large buffer of points and displays all of it in real time (allowing you to move around a 3D area and record its geometry), and also allows you to save the point cloud to a file, for loading into an application such as Blender.

Here are some screenshots of the demo, after I used it to record the inside of my living room: