Our First Useless Application – Hurray!
*** Wait – Quick Update ***
When I started writing this guide it was 2/2/2011 and we are at 2/23/2011, just too much travel and more….
I promise this will not happen again….
*** Wait Again ***
When I started this site I thought it would be simple for someone with basic development skills to write applications and guide other people, now I belive it’s not really the case… am I going to stop? no, not at all, I think you can still pick it up without a problem if you know some and uderstand the basics and if not you will learn as we progress, the only difference is that I don’t this my project here is a two month thing but more like a
lifetime few months… now let’s move on
So after our first guide of setting up the project we will start developing on (if you didn’t read that start there – Linky) we are going to create our first useless application.
I’m going to skip the whole Hello World! Hello Android and move on if that’s ok with y’all to something a little less useless.
So what is the most important thing and priceless and most useless thing at the same time in the world?
I’m going to say time…. (correct me if i’m wrong
but windows 7 was my idea and bare with me here)
So our first application is going to be a clock 🙂
Now that we have Eclipse open we will start in an odd way but after you learn you can take the lead on how and what.
First thing we are going to do is open our res/values/Strings.xml file
Read More »
So before I start writing our first useless app i’d like to start with the Android Project in Eclipse.
Remember the last guide of Eclipse? if not start here – linky
Hit File –> New –> Android Project
Now we will create out project without any activity (screen shot is connected to out next guide with our first application) we will discuss that
Project Name – Straight forward just give it your app name or something that will show up in Eclipse
Build Target – Now this is where you select your minimum android OS version that your application will support, i’m going to go with 1.6 and would not recommend going less then 2.1 as not all devices support 2.2 and up….
Application Name – This is the application name
Package Name – Now if we keep standards here we will use com.inrim.appname where we start with com. then your name or sites name in this case inrim. and then our application name E.G. com.inrim.uselessclock
Un-Check create activity we will get to that some day.
Now your new project will be created in Eclipse
Let’s break it down on what holds what….
So after we create our project this is what we should get in our project’s root directory:
– AndroidManifest.xml, Main XML files that contains details on our application, components, activities, services and more that are going to be used in the application.
– build.xml, a script for compiling the application and installing it on our AVD or Android Device
– default.properties, our property file that is used by our app builder
– src/ folder contains our JAVA source codes
– res/ folder contains our GUI layour, graphics (Icons, Images ETC) and everything will be compiled with out application, please note that you will have three folder for graphics drawable-ldpi, drawable-mdpi, and drawable-hdpi we are not going to use them when we start developing (although it’s something that you will use sometime…)
As we are just starting out in Android development, you can get rid of all three of those directories and create a single drawable directory, putting your image in there.
Now Eclipse does not create all the folders that you might use like
– bin/ contains the application once it is compiled
– libs/ contains third-party Java JARs your application requires
– assets/ contains other files that you want to bundle with your application onto a device
So what no? what happened here?
We have our first project ready, but what can it do? (nothing much but let’s try something)
Right Clock your project –> Expand Run As –> Click Android Appliaction
Your compatible AVD should launch, and…. nothing happens 🙂
So hold on as we are going to dive in very shortly
Ok, so now that you downloaded and installed the Android SDK and created your first AVD we need to move on to the Development environment.
Wait… you didn’t install the SDK??? Start here – Linky
So you will need to download and install Eclipse… What is eclipse? you can review their WIKI – Linky and here is a simple description on what they are…
Eclipse is an open source community, whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle. The Eclipse Foundation is a not-for-profit, member supported corporation that hosts the Eclipse projects and helps cultivate both an open source community and an ecosystem of complementary products and services.
Step 2 – Download and install Eclipse environment
Open Eclipse Website – Linky
Now download Eclipse IDE for Java Developers, based on the OS you have
Now on the download page either download via HTTP or Torrent, more links are on the page (I wanted a smaller screen shot)
After the download is completed extract the content of the file to a folder you want to work in.
In my case it was C:\Android\Eclipse
And run the eclipse.exe main application from where you extracted it to
Hit Continue Reading to move on…
Read More »