Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Alexey Ustenko programmer @ustav
Application Structure
<ul><li>Application Components </li></ul><ul><li>Application components are the essential building blocks of an Android ap...
Activities An activity represents a single screen with a user interface.  Services A service is a component that runs in t...
Activating Components A unique aspect of the Android system design is that any application can start another application’s...
<ul><li>The Manifest File </li></ul><ul><li>Your application must declare all its components in this file, which must be a...
Declaring components The primary task of the manifest is to inform the system about the application's components. For exam...
Application Resources For every resource that you include in your Android project, the SDK build tools define a  unique in...
Android Projects An application project is the main type of project and the contents are eventually built into an .apk fil...
Contains your stub Activity file, which is stored at src/your/package/ActivityName.java.  All other source code files (suc...
Contains the Java files generated by ADT, such as your R.java file and interfaces created from AIDL files.
You can use it to store raw asset files. Files that you save here are compiled into an .apk file as-is, and the original f...
Contains private libraries.
Contains application resources, such as drawable files, layout files, and string values
For XML files that are compiled into animation objects
For XML files that describe colors
For bitmap files (PNG, JPEG, or GIF), 9-Patch image files, and XML files that describe Drawable shapes or a Drawable objec...
XML files that are compiled into screen layouts (or part of a screen)
For XML files that define application menus
For arbitrary raw asset files. Saving asset files here instead of in the assets/ directory only differs in the way that yo...
For XML files that are compiled into many kinds of resource. Unlike other resources in the res/ directory, resources writt...
For miscellaneous XML files that configure application components.  For example, an XML file that defines a PreferenceScre...
The control file that describes the nature of the application and each of its components. For instance, it describes: cert...
This file contains project settings, such as the build target. This files is integral to the project, as such, it should b...
This file defines how ProGuard optimizes and obfuscates your code
Security The Android operating system is a multi-user Linux system in which each application is a different user. Each pro...
/Android/data/<package_name>/your_files Storage Where to place your files on SD Card
Build process Apk file contents
http://developer.android.com
Upcoming SlideShare
Loading in …5
×

Android application structure

13,128 views

Published on

Published in: Technology
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Android application structure

  1. 1. Alexey Ustenko programmer @ustav
  2. 2. Application Structure
  3. 3. <ul><li>Application Components </li></ul><ul><li>Application components are the essential building blocks of an Android application. </li></ul><ul><li>Each component is a different point through which the system can enter your application. </li></ul><ul><li>Here are the four types of application components: </li></ul><ul><li>Activities </li></ul><ul><li>Services </li></ul><ul><li>Content providers </li></ul><ul><li>Broadcast receivers </li></ul>
  4. 4. Activities An activity represents a single screen with a user interface. Services A service is a component that runs in the background to perform long-running operations or to perform work for remote processes. A service does not provide a user interface. Content providers A content provider manages a shared set of application data. You can store the data in the file system, an SQLite database, on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). Broadcast receivers A broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. Applications can also initiate broadcasts.
  5. 5. Activating Components A unique aspect of the Android system design is that any application can start another application’s component. Three of the four component types—activities, services, and broadcast receivers—are activated by an asynchronous message called an  intent .
  6. 6. <ul><li>The Manifest File </li></ul><ul><li>Your application must declare all its components in this file, which must be at the root of the application project directory. </li></ul><ul><li>The manifest does a number of things in addition to declaring the application's components, such as: </li></ul><ul><li>Identify any user permissions the application requires </li></ul><ul><li>Declare the minimum API Level required by the application </li></ul><ul><li>Declare hardware and software features used or required by the application </li></ul><ul><li>API libraries the application needs to be linked against </li></ul><ul><li>And more </li></ul>
  7. 7. Declaring components The primary task of the manifest is to inform the system about the application's components. For example, a manifest file can declare an activity as follows: <? xml version = &quot;1.0&quot; encoding = &quot;utf-8&quot; ?> < manifest xmlns:android = &quot;http://schemas.android.com/apk/res/android&quot; package = &quot;com.test.appstructure&quot; android:versionCode = &quot;1&quot; android:versionName = &quot;1.0&quot; > < uses-sdk android:minSdkVersion = &quot;4&quot; /> < application android:icon = &quot;@drawable/icon&quot; android:label = &quot;@string/app_name&quot; > < activity android:name = &quot;.MainActivity&quot; android:label = &quot;@string/app_name&quot; > < intent-filter > < action android:name = &quot;android.intent.action.MAIN&quot; /> < category android:name = &quot;android.intent.category.LAUNCHER&quot; /> </ intent-filter > </ activity > </ application > </ manifest > Activities, services, and content providers that you include in your source but do not declare in the manifest are not visible to the system and, consequently, can never run.
  8. 8. Application Resources For every resource that you include in your Android project, the SDK build tools define a unique integer ID , which you can use to reference the resource from your application code or from other resources defined in XML. One of the most important aspects of providing resources separate from your source code is the ability for you to provide alternative resources for different device configurations.
  9. 9. Android Projects An application project is the main type of project and the contents are eventually built into an .apk file that you install on a device. Test Projects These projects contain code to test your application projects and are built into applications that run on a device. Library Projects These projects contain shareable Android source code and resources that you can reference in Android projects. Library projects cannot be installed onto a device, however, they are pulled into the .apk file at build time.
  10. 10. Contains your stub Activity file, which is stored at src/your/package/ActivityName.java. All other source code files (such as .java or .aidl files) go here as well.
  11. 11. Contains the Java files generated by ADT, such as your R.java file and interfaces created from AIDL files.
  12. 12. You can use it to store raw asset files. Files that you save here are compiled into an .apk file as-is, and the original filename is preserved.
  13. 13. Contains private libraries.
  14. 14. Contains application resources, such as drawable files, layout files, and string values
  15. 15. For XML files that are compiled into animation objects
  16. 16. For XML files that describe colors
  17. 17. For bitmap files (PNG, JPEG, or GIF), 9-Patch image files, and XML files that describe Drawable shapes or a Drawable objects that contain multiple states (normal, pressed, or focused)
  18. 18. XML files that are compiled into screen layouts (or part of a screen)
  19. 19. For XML files that define application menus
  20. 20. For arbitrary raw asset files. Saving asset files here instead of in the assets/ directory only differs in the way that you access them. These files are processed by aapt and must be referenced from the application using a resource identifier in the R class. For example, this is a good place for media, such as MP3 or Ogg files.
  21. 21. For XML files that are compiled into many kinds of resource. Unlike other resources in the res/ directory, resources written to XML files in this folder are not referenced by the file name. Instead, the XML element type controls how the resources is defined within them are placed into the R class.
  22. 22. For miscellaneous XML files that configure application components. For example, an XML file that defines a PreferenceScreen, AppWidgetProviderInfo, or Searchability Metadata.
  23. 23. The control file that describes the nature of the application and each of its components. For instance, it describes: certain qualities about the activities, services, intent receivers, and content providers; what permissions are requested; what external libraries are needed; what device features are required, what API Levels are supported or required; and others.
  24. 24. This file contains project settings, such as the build target. This files is integral to the project, as such, it should be maintained in a Source Revision Control system. Do not edit the file manually.
  25. 25. This file defines how ProGuard optimizes and obfuscates your code
  26. 26. Security The Android operating system is a multi-user Linux system in which each application is a different user. Each process has its own virtual machine (VM), so an application's code runs in isolation from other applications. An application can request permission to access device data such as the user's contacts, SMS messages, the mountable storage (SD card), camera, Bluetooth, and more. All application permissions must be granted by the user at install time.
  27. 27. /Android/data/<package_name>/your_files Storage Where to place your files on SD Card
  28. 28. Build process Apk file contents
  29. 29. http://developer.android.com

×