Monday, March 15, 2010

Getting Started with Android Development

You want to be begin Android Application Development. But how do you get started? The first thing you need is to download and install the development tools. The good news is they are free and fairly straightforward to setup. The bad news is there are so many options it can become confusing which tools are required, optional or compatible with your desired setup. Following the setup I am using and will work for you if you using a Windows system.

Step 1. Install the following tools
  • Eclipse IDE for Java Developers (v3.5 Galileo)
  • Java Platform (JDK 6 Update 18)
  • Android SDK Tools, Revision 4
You can follow my previous post for step by step directions (with screen captures) here.

Step 2. Create your first application. Try my Hello World tutorial here.

Feel free to post questions or comments.

Monday, March 8, 2010

How to base64 encode decode Android

The official documentation states that base64 encode and decode in Android is in the Android.util package. But when you go to use it you will find it's not there!

After much searching, I confirmation Android left base64 encode and decode out of the Android.util package. So what to do? Don't worry, Robert W. Harder has but together a very fast Base64 encoding and decoding class you can include in your project. Here is how to add base64 encode and decode to your project.

Step 1. Visit Robert's website http://iharder.sourceforge.net/current/index.html and download the class file.

 
Step 2. The zip file you downloaded in step 1 includes the base64 class and a folder with examples and documentation.
Step 3. Copy the Base64.java class file into your project. Copy into your appropriate "src" folder.
Step 4. Refresh your project so the new file is included.
Step 5.When the Base64.java file is included in your project, you will get the following error "The declared package does not match the expected package". Fix this by opening the class file and adding a package declaration that matches your project.
Step 6. Done. You're ready to base64 encode and decode.
 

Download the complete tutorial here

Saturday, March 6, 2010

Vidoes - My First Android Application in the Market

My first Android application is now in the Market. Why did I create this application? Frankly, because it's missing from Android OS. There is a music application for listening to your music. But, to view your videos you must launch the gallery and view your videos mixed in with your pictures. Also, you don't get the video title or video length.

The "Videos" application fills this void with a simple scrolling list of just the videos on your phone. The features of the application:
  • Thumbnail of your videos
  • Video name
  • Video length
  • Time left (if you are in the middle of watching a video)
  • Launch the video

If you have an Android 2.0+ phone you can find it in the market by searching "Videos" or get more information here.


Videos screen capture

Videos screen capture