Archive for June, 2010

Putting my application on Android market

Although my application is far from complete, I’ve decided to put it on the market and see what people think about it.

Most of them have problems running it, mostly crushes.

It made me realize that I need my code to be more robust and support various hardware configurations.

More than 200 people downloaded my app in a few days, which is good start.

Categories: Android Development

decodeYUV420SP using JNI = Nice performance boost

June 26, 2010 6 comments

One of the major issues when trying to implement custom camera live preview,
is converting the byte[] data from the public void onPreviewFrame(byte[] data, Camera camera) function,
to RGB.

This has a huge impact on my app frame rate.

After implementing it using JNI and the NDK, I’ve noticed a huge performance difference.
I didn’t measure it though, so I can give the exact numbers.

I’ve still have some performance issues, that need to be taken care of.

In this stage the app doesn’t have the smooth performance I wan’t…

Categories: Android Development

findViewById return null !!

Trying to cast my view always returned null:

m_View = (MyCustomView)findViewById(;

After A googling a bit I’ve found my problem:

MyCustomViewconstructor didn’t contain “AttributeSet attrs”.

Modifying it fixed the problem.

So two important things to remember:

1. Must call setContentView before findViewById
2. Custom view constructor must receive the following parameters: Context context, AttributeSet attrs

Good luck! 🙂

Categories: Android Development

OpenGL ES Hell :/

I have a weird bug in my application when using OpenGL textures,
from some reason I have a texture that renders white while all other texture are fine.
I can’t find the reason for this, as it delays my development a lot.

Probably something with wrong OpenGL state, but I can’t pinpoint this problem.

Very frustrating, I’m hopping to overcome this obstacle.

Categories: Android Development

Multi Touch on HTC Desire

To my surprise, the HTC Desire and so as the Nexsus doesn’t have a true Multi touch screen.

Touching more than two points doesn’t work and also two points touch has the “reverse

axis” issue as you can see here:

Motorola Droid vs Nexus One: Multitouch Test

This issue prevents developer from developing multi touch games.
Since this might be a hardware issue, I don’t think it can be solved on the software level – new driver.

Only thing left is to hope that future HTC phones will use a true multi touch screens…

Categories: Android Development

Hello Android!

Just started my first Android application and its not a simple hello world application.
I’ve jumped straight into deep water and started developing a complex application that uses OpenGL ES, Camera and the orientation sensor.
More about that on later posts…



Categories: Android Development Tags: ,