Batista R. Harahap

Mixare Augmented Reality Tutorial

Good evening to you guys before I start.

[flashvideo file= /]

I've been in guerilla mode for Augmented Reality solutions these past few weeks and I found Mixare to be one of the best to date. It's Open Source and have put enough knowledge in my head to make my own app. I wanna share the knowledge I got from Mixare. This is my contribution.

Before starting, please make sure you have all the requirements of a regular Android development environment. I'm using Eclipse Galileo with Android SDK Tools Revision 5. My target build is for Android 2.1 API Level 7.

This tutorial is still basic, it's basically an introduction to Mixare without changing much of its base code. Sufficiently changing what's needed just enough to show our own POI's.

First of, you will need to download the source code from Mixare's website at The download is available at Google Code.

Once you've download the source code, import them into your Eclipse by clicking File -> Import from the menu. In my Macbook, there were no problems importing the project but in my Hackintosh, I can't get it to compile. I haven't figure out why yet.

[caption id="attachment_278" align="alignnone" width="356" caption="Import Mixare - Step 1"]Import Mixare - Step 1[/caption]

[caption id="attachment_279" align="alignnone" width="359" caption="Import Mixare - Step 2"]Import Mixare - Step 2[/caption]

After importing the project, to be on the safe side, Clean your Mixare project first by Project -> Clean from the menu. Select Mixare from the following window.

[caption id="attachment_280" align="alignnone" width="331" caption="Clean The Project"]Clean The Project[/caption]

Now let's get down to business. The only you need to change is the file from the src/org/org.mixare tree. Guess what, you'll only need to change one line :)

/** default URL */  
String HOME_URL = "";
I've changed it to a web server which is my blog with the request file mix.php. The default was using a Wikipedia server. Again, this is a very basic tutorial. My mix.php file source is as follows.

As you can see, my mix.php is only generating static content. It's a JSON encoded array. The PHP file does not care any GET variables it gets, it's only statically serving the 3 POI's above. You can see more documentation about the format of the JSON array here.

Now plug in your Android phone to your USB port, build and run the project. The final outcome is shown above with the video.

My next step will be changing that red circle for the POI's into custom icons. You can do this by editing the file at src/org/org.mixare tree. Until next time!

27 April 2010 by Batista Harahap on Android | Augmented Reality | mixare | Nexus One | Tutorial
comments powered by Disqus