Tuesday, May 5, 2009

Hello 0xLab android application

I created an android application 'Hello 0xLab' to display all 0xLab team member information. It looks like a business card, but it is an android apk file. User can download it and install it to Android cell phone. It collects 8 people photo images, phone number, email address and blog web URL.

For me, it's my first android application. I hope it could be fun and also be meaningful for 0xLab. I read HelloAndroid book source code and Android development guides. I choose two topics 'WebView' and 'Intent' to practice.

Android Web Browser is based on Webkit engine, like Qt4 Web Browser. There is a WebView widget in Android API and we can use it as a Web Browser. Therefore, I put a half screen page as a Web browser container. The WebView can load the content from local files stored in 'assets' folder and also can load any web page from the Web. You can write Java script in your html file and interact it with your application too. I modified my application based on a sample code from an Android blog article 'WebViewDemo'. In each person name card, you can see a 0xLab logo in upper part. If you click it, it would change to this person's photo.


From Android Dev guide, three of the core components of an application — activities, services, and broadcast receivers — are activated through messages, called intents. I can use it to trigger Android applications plus information data I add. Therefore, I put three image buttons to interact with other Android phone applications. Click the first one can launch Android Dialer with member's phone number. Click the second one can launch Android Email composer with member's email address. If you click the last one, the WebView would reload to member's blog website.

Are you curious what 0xLab team member look like? Would you like to contact 0xLab directly? Download it and install it to your Android phone! If you are interested how it works, you could download all source code. I created a project 'hello0x1ab' in google code site too.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.