ANATOMY OF
ANDROID
APPLICATION
Presented by-Mrs Pooja Chouhan
• The various files that make up an android project in the
Package Explorer in Eclipse .Like src , gen, android 6.0
,libraries ,assets,bin,res ,android manifest.
Src. • Contains the .java source files for your project.
• You write the code for your application in this file
• The java file listed under the package name for your
project
• In this case MainActivity.java in
com.example,helloworld package
Gen
• Contains the R.java file.
• A compilerGenerated file that reference all the resources found
in your project
• You should not modify this file
• All the resources in your project are automatically compiled into
this class so that you can refer to them using the class
• Additionally you gain compile-time safety that the resource you
want to use really exisits.
Android 6.0
libraries and
appcompat_v7
• Android 6.0 contains one file-android.jar.
• Which contains all the class libraries needed for an
android application
• The appcompat project is a library to support android's
older versions.The support library was introduced by
Google recently.
Assets • The assets folder is empty by default
• This folder is used to store raw asset files.A raw asset
file could be one of many assets you may need for the
application to work
• Such as HTML text files database ,audio file etc.
• Android hasAsset Manager which can return all the
assets currently in the assets directory
bin • This folder contains the files built by the ADTduring the buil
process.
• In particular it generates the .Apk file(Android package).
• .apk file is the application binary of and android application
• It contains everything needed to run an android application
• .dex file is also stored in this folder
res • This folder contains all the resources required like
images, layouts and values
• Resources are external files(non-code files) that are
used by your code and compiled into your application
at build time
• Android Supports a number of different kinds of
resources files, including XML,PNG and JPEG files.The
XML files have very different formats depending on
what they describe.
• Rescource-types and where to place them:
layout-files ————> “/res/layout/”
Images —————->”/res/drawable”
animations————->”res/anim/”
styles, strings and arrays —> “/res/values/”
Android
Manifest.xml
• This is the manifest file for your application.
• It is located in the root folder of the application, and
describes global values for your package
• Here you specifies permissions as well as other feature.
• An important thing to mention of this file are its so
called IntentFilters.These filters describe where and
when that activity can be started. Besides declaring
your application’sActivities, Content Providers,
Services and Intent Receivers
Thanks

Anatomy of android aplication

  • 1.
  • 2.
    • The variousfiles that make up an android project in the Package Explorer in Eclipse .Like src , gen, android 6.0 ,libraries ,assets,bin,res ,android manifest.
  • 3.
    Src. • Containsthe .java source files for your project. • You write the code for your application in this file • The java file listed under the package name for your project • In this case MainActivity.java in com.example,helloworld package
  • 4.
    Gen • Contains theR.java file. • A compilerGenerated file that reference all the resources found in your project • You should not modify this file • All the resources in your project are automatically compiled into this class so that you can refer to them using the class • Additionally you gain compile-time safety that the resource you want to use really exisits.
  • 5.
    Android 6.0 libraries and appcompat_v7 •Android 6.0 contains one file-android.jar. • Which contains all the class libraries needed for an android application • The appcompat project is a library to support android's older versions.The support library was introduced by Google recently.
  • 6.
    Assets • Theassets folder is empty by default • This folder is used to store raw asset files.A raw asset file could be one of many assets you may need for the application to work • Such as HTML text files database ,audio file etc. • Android hasAsset Manager which can return all the assets currently in the assets directory
  • 7.
    bin • Thisfolder contains the files built by the ADTduring the buil process. • In particular it generates the .Apk file(Android package). • .apk file is the application binary of and android application • It contains everything needed to run an android application • .dex file is also stored in this folder
  • 8.
    res • Thisfolder contains all the resources required like images, layouts and values • Resources are external files(non-code files) that are used by your code and compiled into your application at build time • Android Supports a number of different kinds of resources files, including XML,PNG and JPEG files.The XML files have very different formats depending on what they describe. • Rescource-types and where to place them: layout-files ————> “/res/layout/” Images —————->”/res/drawable” animations————->”res/anim/” styles, strings and arrays —> “/res/values/”
  • 9.
    Android Manifest.xml • This isthe manifest file for your application. • It is located in the root folder of the application, and describes global values for your package • Here you specifies permissions as well as other feature. • An important thing to mention of this file are its so called IntentFilters.These filters describe where and when that activity can be started. Besides declaring your application’sActivities, Content Providers, Services and Intent Receivers
  • 10.