Archive

Archive for the ‘Android’ Category

Android Tutorial Update Part I

November 9th, 2008 Gareth 2 comments

I know I may not be the best with Eclipse, but some of the notes that Google is giving for using Eclipse and their tutorials need to be updated.  As I progress through the tutorials, I’ll probably be adding new updates to assist others with problems I come across (not that there are many, but could cause other beginners to Android give up before even getting a good start).

The first thing I came across that was mildly annoying, but needs to be noted as it may cause some issues for others trying to follow along with the tutorials.  In Tutorial: Notepad Exercise 1, Step 1, it mentions that to create the new project to download the source and select “Create project from an existing source”.  When I tried to do this, Eclipse balked and stated that there already existed.  I then moved my files from my workspace to my desktop then tried again.  However, using this method, the project was now using the files from my desktop.

I think the better way to get the project up and running is to import the files (as Eclipse actually states when you try to create the project in the same space as your workspace).  To do this go to

File -> Import -> General -> Existing Projects Into Workspace
Then select “Browse” next to “Select root directory” and find your Notepad files (mine were on my desktop).
Make sure to also check “Copy projects into workspace” so the files are copied to your android workspace.
Click Finish.

Now you should have the Notepadv1 project imported into your android workspace in Eclipse and all files should be located with the rest of your android files.  This to me seems like a better way of accessing the files than having them all over your computer.

Categories: Android, Eclipse Tags: , ,

Android ate my hard drive

November 3rd, 2008 Gareth 2 comments

With all of the buzz about Android (Google’s foray into an OS for mobile devices), I decided that now would be a good a time as any to actually check out the code, and see what I could come up with.  The code is actually very similar to Flex, probably due to it being written in Java, so I was able to come up to speed pretty quickly once I began to look into it.  The only thing that is taking a little bit of time is knowing what all of the libraries are that comprise the Android code base.  Luckily Google has planned for that eventuality and provided a very useful API (as they do with all of their distributed code).

So far I have only downloaded the “Hello World” application (or Hello Android in this case), but that ran without too many issues.  The main one that I came across (and the reason for naming this article the way I did), was that each time I ran the Android emulator, my C drive lost about 40 megs of hard drive space.  Not realizing this at first, I actually ran out of hard drive space while I was testing.

After some digging, it turns out that the emulator creates a ~41MB temp file on the local drive each time the emulator is run that is Temporary System image file.  My only problem is that this is not removed each time you test the device, and, after a while, as I found out, the hard drive will get filled up until those files are deleted.  Even finding them was a bit of a pain, but in order to alleviate that pain for others go to
C:\documents and settings\<logged in user>\Local Settings\Temp\AndroidEmulator\
and delete all files that you find in there.  This will remove all of the temporary system files that are created each time Android starts up, and save your hard drive space.

If I get time I may start a “how-to” series for Android, so others can see what’s needed to write Android apps.  I’m enjoying it so far…perhaps I’ll even buy myself a G1 at some point :)

Categories: Android Tags: , ,