Android Camera2 Touch-to-Focus

Man Camera2 APIs are hard to master...

I've scanned SO for a way to get touch-to-focus to work on Android and could not find a solution that works.
These were very partial, or provided only scaffold code which I couldn't use:

Finally I was able to do it by myself this way:



Simple Loading Spinner Tapestry 5 Mixin w/ spin.js

Sharing a small snippet on creating a loading spinner in a Tapestry 5.3+ Mixin, using spin.js.
It creates a convenient way to add spinners to your long-loading-times ajax zone updates, with all the code hidden away from the template .tml and page class object.

Sorry I can't show a working example, that would entail running a Tapestry application server.
But it's very straightforward, just grab the spin.min.js and the rest falls into place (it also depends on jQuery).


Apache Tapestry 5 Progress Bar with jQuery+Bootstrap [w/code]

Just sharing a code snippet about how to implement a jQuery+Bootstrap progress bar for a background operation in Tapestry 5. There's not a lot to it, but it took me a while and serious digging through the internet to find how to make it work. Essentially it's based on a coupleĀ of examples and references I found:

But IĀ simplified things because I don't like the over-design Java can easily make you do...
Continue reading "Apache Tapestry 5 Progress Bar with jQuery+Bootstrap [w/code]"


Android frame animation revisited [w/ code]

So, been working hard on my projects, and discovered some interesting things in Android possibilities for frame animation. Last time I was using an HTML approach, because of memory consumption issues with using ImageViews. However now my approach is using View.onDraw(Canvas) to draw BMPs straight off files, in an asynchronous way, and it seems to work pretty good.
Let me tell you how I did it
Continue reading "Android frame animation revisited [w/ code]"


Some things I learned about Android's Frame animation


Just a quick share of lessons learned about Android's Frame-by-Frame animations. Some of the functionality is poorly documented, as many people point out, so the web is the only place for answers. Having looked for some answers to these questions and couldn't find any - here's what I found out myself.

Update [2/3/11]: A new post on this topic gives a more broad view of my experience.
Continue reading "Some things I learned about Android's Frame animation"


Reading contacts in Android 2.0+

On one of my Android apps, I added a trivial option to select a contact from the phone's contact list. This was working fine until SDK version 5, which changed the way the contacts are represented in the phone's SQLite database. It is using the "newer" class called ContactsContract instead of the deprecated People class

I have spent quite time in order to figure out which was the best way that will fit my needs. If you are in the same position, feel free to use the code below

My example below is will display a two row list of all the contacts, with alphabetical indexing. It is a mixture of code snippets I have found on the net, while may not be optimized; it will definitely give you the hang of things.

Continue reading "Reading contacts in Android 2.0+"


SmartHome - Embedded computing course project

In the past few weeks I have been working hard at a few projects for end-of-term at Uni. One of the projects is what I called "SmartHome", for Embedded computing [link] course, is a home monitoring [link] application. In the course the students were given an LPC2148 arm7-MCU (NXP) based education board, implemented by Embedded Artists [link]. My partner Gil and I decided to work with ZigBee extension modules [link] to enable remote communication.

Here are the steps we took to bring this project to life.
Continue reading "SmartHome - Embedded computing course project"


GeekCon 2009: RunVas - Our project [w/ video, img]

runvasHi everyone

In the last weekend I attended GeekCon 2009, a tech-conference, with a friend and colleague Arnon (not Arnon from the blog, who recently had a birthday - Happy B-Day Arnon!). Each team that attended had to create a project they can complete in 2-days of the conference. Our project is called "RunVas", and the basic idea was to let people run around and paint by doing so. We wanted to combine computer vision with a little artistic angle.

Here's some more details
Continue reading "GeekCon 2009: RunVas - Our project [w/ video, img]"