Tuesday, March 29, 2011

The basics and running a program in Android





In brief,
To create a project
Project name: Put a name for the project

Application name: The name to be appeared in the phone menu,under the application icon

Package name:We make it unique in marketplace. The format is always"com.name.anothername".In Android, packages are also important for application signing purposes. Your package name should be the reverse of your domain name with optional subdomains. I might use com.example.calculator if I were building a calculator app and my domain name was example.com. (Source:http://ofps.oreilly.com/titles/9781449390501/ch03.html)

Create activity: Basically it is like the main class or the main activity in Java programming

MinSDK : Follow the version of the selected target will do


Layout
We can fill this from the "Package Explorer".
src: where the java file lies

gen:auto-generated

andriodXX:Java reference and the import files

res:stands for the resources where the graphics,sound,layout etc of an application is being stored.
**take note that we must use small letters for the image name in order to avoid error

To run a project
Firstly we need to set the emulator by launching "Android SDK and AVD Manager" and create a new AVD

Next,Run Configuration>>New Configuration>>Set the target>>Browse for the project name>>Apply>> Run

No comments:

Post a Comment