Development Environment

Android Application Development Environment

  • Android requires following tools to be installed in the order mentioned below to create the development environment:
  1. Java SDK
  2. Android SDK
  3. Eclipse IDE
  4. Android Development plugin for Eclipse
Android Project Structure
Root Contents
  • Key items in the project's root directory :
  1.  AndroidManifest.xml : an XML file describing the application activities, services, etc.
  2. bin/, application after it is compiled
  3. src/, Java source code
  4. res/, holds "resources", such as icons, GUI layouts etc
  5. Gen/, system generated java code
Android SDK Tools
  • The Android SDK includes a variety of custom tools that help you develop mobile applications on the Android platform.
  • All the tools of the android are located in tools/ directory of the SDK.
  1. Emulator: Virtual Mobile device that runs on computer
  2. Dalvik Debug Monitor Service (ddms): Provides screen capture on the device, thread and heap information on the device, logcat,process, and radio state information, incoming call and SMS spoofing, location data spoofing, and more.
  3. Android Debug Bridge (adb): a versatile tool lets us manage the state of an emulator instance or Android-powered device.
  4. Android Development Tools Plugin: a plugin for the Eclipse IDE that lets us quickly set up new android projects
  5. Android Virtual Devices (AVDs): Configurations of emulator options that lets us better model an actual device
  6. Android Asset Packaging Tool (aapt): allows us to view, create and update Zip-compatible archives (zip, jar, apk) and to compile resources into binary assets.
  7. Traceview:  A graphical viewer for execution logs saved by the application and it helps in debugging
  8. Hierarchy viewer: Provides a visual representation of the Layout view and allows us to debug and optimize UI
  9. Mksdcard:  Lets us create a FAT32 disk image that can be loaded in the emulator to simulate an SD card
  10. Dx:  Lets us generate android byte code from .class files.
  11. UI/Application Exerciser Monkey: Program that runs on emulator/device and generates stream of user events(clicks, touches,gestures) and number of system level events. It is used to stress-test applications.
  12. Layoutopt:  Helps us to optimize the layouts and layout hierarchies.
  13. Draw 9-patch:  Allows us to create a NinePatch graphic using a WYSIWYG editor 
  14. Android Interface Description Language (aidl) :  Used to generate code that enables two processes on android powered device to talk using IPC
  15. Sqlite3:  Command-line program to manage SQLite databases created by android applications
  16. android tool available in the tools/ directory of the sdk when invoked with no options will launch the interface shown below to manage the AVDs.
  17. Android tool provides command line options to perform all the operations supported the  following interface.
  18.  By default, the android tool creates the AVD directory in following path
    1.   Linux & Mac : ~/.android/avd/
    2. Windows : C:\Documents and Settings\<user>\.android
  19.  
 AVD's: 
Android Virtual Devices are configurations of emulator that allows the users to model a actual device. Each AVD allows the user to set
following properties:
  1. Hardware profile: Used to define the hardware features of the virtual device.
                     For example:
                                  Availability of camera in device
                                  Memory capacity on the device etc
    2.  Android platform
    3.  Emulator skin
    4.  Emulated SD card
    5.  Dedicated storage area on development machine, which is used to store the device's user data (installed applications, settings, and so on) and emulated SD card.

Starting the Emulator:
Starting the emulator
  •  Command line
                    $ emulator -avd <avd_name>
                              Through emulator it will be invoked automatically, when the application is started.
  • Emulator startup options
                    $ emulator -avd <avd_name> [-<option> [<value>]] ... [-<qemu args>]
DDMS:
Dalvik Debug Monitor Server (DDMS) is a debugging tool, which provides following functionalities:
  •  Port-forwarding services
  • Screen capture
  • Thread and heap information
  • Logcat
  • Process and Radio state information
  • Incoming call and SMS spoofing
  • Location data spoofing

Comments

Popular posts from this blog

Android Objective type Question and Answers

Android Questions and Answers for written exams

Android Interview questions