Sketchbook app for Android

I have a Samsung Galaxy Note II. As you may already know, it has a big screen and the fact that it comes with a note taking app made by Samsung (I think) makes it very useful to jot down ideas, doodle, etc. I, however, wondered if there was an app that would facilitate doodling even more – a Photoshop caliber doodling app, if you will. Thus, began my search for a graphic program.

I tried the Sketchbook Express app and fell in love with it. It’s a bit limiting but you get an idea of what the paid version can do. I like the way the UI works, too. It doesn’t have any menus or anything visible on the screen – just a dot at the bottom. You tap the dot and out pop all tools. It has all sorts of brushes, color picker, the eye-dropper, etc. You can make a custom brush if preset ones don’t meet your needs.

After fiddling with the free version, I decided to get the paid version of the app (which was for $2.13 with taxes when I bought it). I am not an artist but after messing with the free and paid versions, I was able to draw these images.

This picture took me 2-3 hours on the free version:

Sunset

I started making this one in the free version and completed it in the paid version (took me 3 weeks to complete – a few minutes here, a few minutes there):

Desk

Just to be safe: No one is allowed to use these images without my written permission.

Nexus S and TMobile data connection

Here’s an interesting tidbit. If you go out of the country and come back. Nexus S won’t automatically connect to TMobile’s 3G or edge network. You have to switch it off and start it again for it to connect to the data network. It will, however, let you make phone calls, and send and receive SMS without restarting it.

Setting up your Android environment

I have seen quite a few posts on some lists asking about how to set up a programming environment for Android. While it is very straight forward, the documentation is all over the place. So, I decided to write this tutorial :).

In this tutorial, we will install Android SDK in eclipse (Galileo), we will add an SD Card to your emulator and put some pictures in it. I have written this tutorial with Windows users in mind but the process should not be very different for other platforms.

I have written this tutorial assuming that you already have JDK installed. If you don’t have it already installed then please install it before reading this. You can find a tutorial on how to install here.

Installing the SDK

  1. Download the latest eclipse IDE from
    http://www.eclipse.org/downloads/.

    You can also download Galileo directly from here.

  2. Create a folder in your c:\ drive and name it android. The file you just downloaded (at least from the direct link I provided above) is a zip file which contains a folder called eclipse. Extract the zip file and place the folder in, c:\android. Now, you have eclipse installed in c:\android. Go into the eclipse folder. You will see an executable called eclipse. Double click it to run eclipse.

    Click to enlarge
    Click to enlarge
  3. Now, download the android SDK 1.6 (the latest as of this writing) for windows from the link below:http://developer.android.com/sdk/download.html?v=android-sdk-windows-1.6_r1.zipTo download the SDK for other platforms, go here :http://developer.android.com/sdk/1.6_r1/index.html
  4. Extract the contents of the zip file in c:\android\. Now, you will have 2 folders in c:\android\. One is eclipse and the other is android-sdk-windows-xxx.android-sdk-windows-xxx folder contains another folder called tools. We need to add this folder to the system’s PATH variable. To do that, Click on Start, then right click on “My Computer” and click on “Properties” in the menu that pops up.

The “System Properties” dialog will pop up. Click on the “Advanced” tab and then click on “Environment variables”. Another dialog will appear.

Run eclipse. Click on Help -> Install New Software.

Click to enlarge
Click to enlarge

An install dialog will appear. Click on “Add”, another dialog will appear. Type in Android for name and put in https://dl-ssl.google.com/android/eclipse for Location. Then click OK. Click on next, check both the checkboxes and click next. Eclipse will start downloading the plugin and install it. You will be asked to restart eclipse after the installation is done. Click on “Yes” when it asks you to restart. Eclipse will restart and you can, now, create Android projects!

Click to enlarge
Click to enlarge

Now that the basic installation is done. Let’s setup the SC Card.

Setting up the SD Card

Creating the SD card is very easy.

  1. Click on Start -> Run. The run dialog will appear
  2. Type “cmd” (without the quotes) and hit enter or click the OK button. A commant prompt window will appear.
  3. Type “android list targets” in it and hit enter. It will show you a list of targets. Get the id for Android 1.6. It will most probably be 2
  4. Type the command “android create avd -n testavd -t <target_id> -c 128M” (without the quotes) and hit enter. Make sure to subsitute the <target_id> with the actual ID you got from “android list targets” command. Since it will most probably be 2, the command will look like this “android create avd -n testavd -t 2 -c 128M (again without quotes).
  5. Press enter 1 more time

Viola! you have created your SD Card for the emulator. The next time you start the emulator, you will be able to access it. Below is an illustration to make things easy.

Click to enlarge
Click to enlarge

When I created my SD card, I needed to get some pictures on it. So, I used an external program called winimage to do that.

Working with your SD card

  1. Download winimage from http://www.winimage.com/download.htm. You can either get the zip file or the exe file. I downloaded the zip file, extracted it and use that.
  2. Run winimage.exe and make sure your emulator is not running.
  3. Click on Open image icon. Browse to c:\android\sd_card\ folder. Select sdcard and click OK button. Winimage will open the sdcard image. Now, you can browse the file structure and add files, delete files, etc. After you are done, make sure to close winimage or you won’t be able to access the SD card from the emulator.

As always here’s an illustration:

Click to enlarge
Click to enlarge

Now, we have an the SD Card image open. Let’s create a folder called “media” and put some pictures in it. When you take pictures with your phone’s camera they are stored in the media folder in  your SD Card.

To create the media folder, click on Image, then on Create Folder. A dialog box will appear. Type “MEDIA” in it. and Click OK. After the folder is created, you can drag and drop pictures from your computer to the media folder just like you would normally do it when copying files from one location on your computer to another.

WinImage
Click to Enlarge
Create Folder
Click to enlarge
Copy pictures
Click to enlarge

Android HttpRequest class (version 2.1)

Version of of this class had some bugs so I corrected them and here is the latest version 🙂

Enjoy!

You will also need the class below:

HTTP Request class for Android

Here is a class that can be used to make HTTP get and HTTP post requests. I haven’t commented everything but the usage should be pretty clear from the method signatures.

Note: This is for Android 1.5.

You will also need this class along with it.

  1. import java.util.Hashtable;
  2.  
  3. public class HttpData {
  4.     public String content;
  5.     public Hashtable<String, String> cookies = new Hashtable<String, String>();
  6.     public Hashtable<String, String> headers = new Hashtable<String, String>();
  7. }

Android 1.5 SDK Released !

Google has released Android 1.5 SDK. This release is based on the cupcake branch in Android’s repository. Cupcake was a modified version of the SDK written by a group of independent developers and functioned better than the 1.0 SDK. Android 1.5 SDK also has other enchancements like a better profiler. For a list of all changes and enhancements, please visit: http://developer.android.com/sdk/RELEASENOTES.html

Sending data to other activities in Android

Let’s say you have a list activity which lists some information and you have another activity which adds/edits information in the list. How do you tell the edit activity which item (in the list of the first activity) needs to be edited? 

 

In the first activity, you will do this :

Let’s take a look at SetContact activity which be used to edit (or add) data to the list.

When the second activity sends data back to the first activity, onActivityResult method is called (in the first activity). It will look something like this :

More Android phones on the way

Yes, you heard it. More Android based phones (at least 2)are on their way some time in 2009. Motorola, Sony, Samsung, etc are also going to come out with Android phones some time by 2010. HTC’s CEO said that they will be releasing at least 3 phones this year. We know one of them is the G2, which means that HTC will be releasing 2 more Android phones. 

For those of you who are thinking of buying an Android based phone: you may want to wait a few more months and see if the new phones are better than G1 (which has an annoying design honestly)

Here is some more information on this topic :

Information week

Beta news

Engadget


Android Exeda – A more detailed look

I had written a post about CompuLab releasing an Android based phone called Exeda. It’s official now and they are making it available in March. They will make the price available along with the phone. It has a 3.5 inch screen which is sun-readable. It also has a touchpad which acts as a mouse. The phone itself seems very small in the picture so it might not be meant for big fingers. The keys are very small in size. It also comes with Windows Mobile and they say they will add support for Linux in the future (yay! Linux).

According to its maker

“Exeda is designed to serve as an enterprise digital assistant (EDA). Comprised of embedded components, the exeda has guaranteed long-term availability and can be custom configured when ordered in volume. “

For more information go to http://www.exedamobile.com/web/?gclid=CJHqrvG4qJgCFQrAGgodLyYvnw and http://www.exedamobile.com/web/index.php?option=com_content&view=article&id=3&Itemid=7

Exeda
Exeda
Exeda
Exeda