Urban pro

View My Profile

Saturday, April 27, 2013

How to Set up an environment for Android Development

Hi friends,

Back to you after a long time. Today we are going to look into a very important technology  namely : Android. 

Now the android programming language is very useful for app development . A lot  of us want to be app developers but we are not sure about how to progress.  Well the upcoming few weeks , we will look deeply into this technology and try to learn a lot of things.

However, what good is this , if we don't have an application development environment to test what we have learnt ? So i am gonna tell you how how to set up a local work space for Android . Hang tight.


For the most part, you'll figure out pretty quickly through trial and error what you'll need. If you're using Eclipse, it will yell at you when you're missing things, and you simply find what you're missing in the SDK Manager and install it.
That said, here's what I needed to get up and running with a very basic setup (this assumes using Android 4.1, if you plan on building for an earlier version, then you'll need to download the corresponding libraries from that version):
  • SDK Platform
  • ARM EABI v7a System Image (optional, you can also grab the Intel x86 Atom and/or Mips System images if you plan on developing for one of those platforms; ARM is the default, from what I've seen)
  • Android SDK Platform-tools
You get these simply by going to the Android SDK Manager (your SDK folder/tools/android; or click the "SDK Manager" button in Eclipse), selecting what you need, and clicking "Install Packages". Once you do that, you can follow the rest of the guide that you linked for building your first app (I highly recommend it, it's extraordinarily beneficial), and your app should run with no problem.

Here's a snapshot to get you started :


Now all you gotta do , is install the packages that I have checked in and that creates your basic set up. The other stuff you can install later.

Hope that was useful. Very soon we will dive in to the world of Android.

Good Bye .

Sunday, April 7, 2013

BASH COMMANDS - PART 1


Hi friends,

Today  we are gonna go in  a different direction . After some time , i thought of coming out with a series of tutorials on BASH scripting , which is a must if you wanna write complex scripts. My try outs here will
consist of commands written in UBUNTU 12.04 PP LTS as this is what i am using right now. So let us open up our terminal and begin our wonderful journey :

Finding out where the inbuilt commands lie :


Type :
bash$ : cd /bin
bash$/bin : ls


Creating my own directory and seeing the permissions it has :
mkdir kunal
ls -ld kunal → drwxrwxr-x 2 atri atri 4096 Apr 3 02:00 kunal

Consider these shell operations :



Consider the next set of shell commands :

How to make use of manual in Unix :
bash$ : man man
O/P :


What if we give :
bash$ : man cp




What is Shebang ? :

The shebang is the first line in a script because it is interpreted by the kernel, which looks at the two bytes at the start of an executable file. If these are #! the rest of the line is interpreted as the executable to run and with the script file available to that program on stdin. Since the kernel will only look at the first two characters and has no notion of further lines, you must place the hash bang in line 1.
Let us consider the script below :


This script does a listing of files and in between the first and last listing , it tries to read a file. So if you try to execute the file without changing its permissions it won't run. Hence first you gotta do this :

bash $ : ls -lrt yourFile --> get the available permissions
bash $ : chmod a+x yourFile --> make the file executable.
Voila, now you are ready to run it. Just do :
bash $ :  ./yourFile

 or

bash $: sh yourFile.sh

That's  all for today. Next time we will delve deeper .

Good Bye .