Android primer


Published on

Basic Learning about Android

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Android primer

  1. 1. Compiled by intellisense ITsys Pvt LtdDr Kalpesh Parikh, Director
  2. 2. Compiled by intellisense ITsys Pvt LtdAndroid is a software stack for mobile devices that includes an operatingsystem, middleware and key applicationsWhat is Android
  3. 3. Compiled by intellisense ITsys Pvt LtdApplication framework enabling reuse and replacement of componentsDalvik virtual machine optimized for mobile devicesIntegrated browser based on the open source WebKit engineOptimized graphics powered by a custom 2D graphics library; 3D graphics based on theOpenGL ES 1.0 specification (hardware acceleration optional)SQLite for structured data storageMedia support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC,AMR, JPG, PNG, GIF)GSM Telephony (hardware dependent)Bluetooth, EDGE, 3G, and WiFi (hardware dependent)Camera, GPS, compass, and accelerometer (hardware dependent)Rich development environment including a device emulator, tools for debugging,memory and performance profiling, and a plugin for the Eclipse IDEAndroid Features
  4. 4. Compiled by intellisense ITsys Pvt LtdAndroid OS-Architecture
  5. 5. Compiled by intellisense ITsys Pvt LtdAndroid will ship with a set of core applications including an email client, SMSprogram, calendar, maps, browser, contacts, and others. All applications arewritten using the Java programming language.Applications
  6. 6. Compiled by intellisense ITsys Pvt LtdBy providing an open development platform, Android offers developers the ability to buildextremely rich and innovative applications. Developers are free to take advantage of the devicehardware, access location information, run background services, set alarms, add notifications tothe status bar, and much, much more.Developers have full access to the same framework APIs used by the core applications. Theapplication architecture is designed to simplify the reuse of components; any application canpublish its capabilities and any other application may then make use of those capabilities(subject to security constraints enforced by the framework). This same mechanism allowscomponents to be replaced by the user.Underlying all applications is a set of services and systems, including:A rich and extensible set of Views that can be used to build an application, including lists, grids,text boxes, buttons, and even an embeddable web browserContent Providers that enable applications to access data from other applications (such asContacts), or to share their own dataA Resource Manager, providing access to non-code resources such as localized strings,graphics, and layout filesA Notification Manager that enables all applications to display custom alerts in the status barAn Activity Manager that manages the lifecycle of applications and provides a commonnavigation backstackApplication Framework
  7. 7. Compiled by intellisense ITsys Pvt LtdSystem C library - a BSD-derived implementation of the standard C system library(libc), tuned for embedded Linux-based devicesMedia Libraries - based on PacketVideos OpenCORE; the libraries supportplayback and recording of many popular audio and video formats, as well as staticimage files, including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNGSurface Manager - manages access to the display subsystem and seamlesslycomposites 2D and 3D graphic layers from multiple applicationsLibWebCore - a modern web browser engine which powers both the Androidbrowser and an embeddable web viewSGL - the underlying 2D graphics engine3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries useeither hardware 3D acceleration (where available) or the included, highly optimized3D software rasterizerFreeType - bitmap and vector font renderingSQLite - a powerful and lightweight relational database engine available to allapplicationsCore Libraries
  8. 8. Compiled by intellisense ITsys Pvt Ltd•Android includes a set of core libraries that provides most of the functionalityavailable in the core libraries of the Java programming language.•Every Android application runs in its own process, with its own instance of the Dalvikvirtual machine.•Dalvik has been written so that a device can run multiple VMs efficiently.•The Dalvik VM executes files in the Dalvik Executable (.dex) format which isoptimized for minimal memory footprint.•The VM is register-based, and runs classes compiled by a Java language compilerthat have been transformed into the .dex format by the included "dx" tool.•The Dalvik VM relies on the Linux kernel for underlying functionality such asthreading and low-level memory management.•Linux KernelAndroid relies on Linux version 2.6 for core system services such as security,memory management, process management, network stack, and driver model. Thekernel also acts as an abstraction layer between the hardware and the rest of thesoftware stack.Android Runtime
  9. 9. Compiled by intellisense ITsys Pvt Ltd Life Cycle
  10. 10. Compiled by intellisense ITsys Pvt LtdBASIC Terminologies.apk fileAndroid application package file..dex fileCompiled Android application code file.ActionA description of something that an Intent sender wants done. An action is a stringvalue assigned to an Intent.ActivityA single screen in an application, with supporting Java code, derived from the Activityclass. Most commonly, an activity is visibly represented by a full screen window thatcan receive and handle UI events and perform complex tasks, because of theWindow it uses to render its window. Though an Activity is typically full screen, it canalso be floating or transparent.adbAndroid Debug Bridge
  11. 11. Compiled by intellisense ITsys Pvt LtdApplicationAn Android application consists of one or more activities, services, listeners, andintent receivers.CanvasA drawing surface that handles compositing of the actual bits against a Bitmap orSurface object.Content ProviderA data-abstraction layer that you can use to safely expose your applications datato other applications.DalvikThe Android platforms virtual machine. The Dalvik VM is an interpreter-only virtualmachine that executes files in the Dalvik Executable (.dex) formatDDMSDalvik Debug Monitor ServiceDialogA floating window that that acts as a lightweight form.BASIC Terminologies
  12. 12. Compiled by intellisense ITsys Pvt LtdDrawableA compiled visual resource that can be used as a background, title, or other partof the screenIntentAn message object that you can use to launch or communicate with otherapplications/activities asynchronously.Intent FilterA filter object that an application declares in its manifest file, to tell the systemwhat types of Intents each of its components is willing to accept and with whatcriteria.Broadcast ReceiverAn application class that listens for Intents that are broadcast, rather than beingsent to a single target application/activity.Layout ResourceAn XML file that describes the layout of an Activity screen.BASIC Terminologies
  13. 13. Compiled by intellisense ITsys Pvt LtdManifest FileAn XML file that each application must define, to describe the applications packagename, version, components (activities, intent filters, services), imported libraries,and describes the various activities, and so on. See The AndroidManifest.xml Filefor complete information.OpenGL ESAndroid provides OpenGL ES libraries that you can use for fast, complex 3Dimages.ResourcesNonprogrammatic application components that are external to the compiledapplication code, but which can be loaded from application code using a well-known reference format.ServiceAn object of class Service that runs in the background (without any UI presence) toperform various persistent actions, such as playing music or monitoring networkactivity.BASIC Terminologies
  14. 14. Compiled by intellisense ITsys Pvt LtdSurfaceA Surface holds a Canvas object for drawing, and provides various helpermethods to draw layers and resize the surface.SurfaceViewA View object that wraps a Surface for drawing, and exposes methods to specifyits size and format dynamically.ThemeA set of properties (text size, background color, and so on) bundled together todefine various default display settings.URIs in AndroidAndroid uses URI strings as the basis for requesting data in a content provider(such as to retrieve a list of contacts) and for requesting actions in an Intent(such as opening a Web page in a browser).ViewA View is a base class for most layout components of an Activity or Dialogscreen (text boxes, windows, and so on).BASIC Terminologies
  15. 15. Compiled by intellisense ITsys Pvt LtdViewgroupA container object that groups a set of child Views.Widget :View subclasses that render form elements and other UI components, such asa text box or popup menu.BASIC Terminologies
  16. 16. Compiled by intellisense ITsys Pvt LtdANDROID Software Stack
  17. 17. Compiled by intellisense ITsys Pvt LtdANDROID Programming Framework
  18. 18. Compiled by intellisense ITsys Pvt LtdQuick StartThe steps below provide an overview of how to get started with the Android SDK.For detailed instructions, start with the Installing the SDK guide.1. Prepare your development computerRead the System Requirements document and make sure that your developmentcomputer meets the hardware and software requirements for the Android SDK.Install any additional software needed before downloading the Android SDK. Inparticular, you may need to install the JDK (version 5 or 6 required) and Eclipse(version 3.4 or 3.5, needed only if you want develop using the ADT Plugin).2. Download and install the SDK starter packageSelect a starter package from the table at the top of this page and download it toyour development computer. To install the SDK, simply unpack the starterpackage to a safe location and then add the location to your PATH.Setting up Development Computer
  19. 19. Compiled by intellisense ITsys Pvt Ltd3. Install the ADT Plugin for EclipseInstall the Android Development Tools (ADT) Plugin, restart Eclipse, and set the"Android" preferences in Eclipse to point to the SDK install location.4. Add Android platforms and other components to your SDKUse the Android SDK and AVD Manager, included in the SDK starter package, toadd one or more Android platforms (for example, Android 1.6 or Android 2.2) andother components to your SDK.To launch the Android SDK and AVD Manager on Windows, execute SDKSetup.exe, at the root of the SDK directory. On Mac OS X or Linux, execute theandroid tool in the <sdk>/tools/ folder.The Android NDK is a companion tool to the Android SDK that lets youbuild performance-critical portions of your apps in native code.Setting up Development Computer
  20. 20. Compiled by intellisense ITsys Pvt LtdEclipse IDE
  21. 21. Compiled by intellisense ITsys Pvt LtdEclipse IDE – Project Files
  22. 22. Compiled by intellisense ITsys Pvt LtdEclipse IDE : Android Phone emulator
  23. 23. Compiled by intellisense ITsys Pvt Ltd“Hello Android” Project
  24. 24. Compiled by intellisense ITsys Pvt LtdCreate New Project (1)
  25. 25. Compiled by intellisense ITsys Pvt LtdCreate New Project (2)
  26. 26. Compiled by intellisense ITsys Pvt LtdCreate New Project (3)
  27. 27. Compiled by intellisense ITsys Pvt LtdCreate New Project (4)
  28. 28. Compiled by intellisense ITsys Pvt LtdEditing Java Source File
  29. 29. Compiled by intellisense ITsys Pvt LtdEditing Layout Resource File
  30. 30. Compiled by intellisense ITsys Pvt LtdEditing Values Resource File
  31. 31. Compiled by intellisense ITsys Pvt LtdEditing AndroidManifest.xml
  32. 32. Compiled by intellisense ITsys Pvt LtdDebugging Syntax Error
  33. 33. Compiled by intellisense ITsys Pvt LtdRunning the Program (1)
  34. 34. Compiled by intellisense ITsys Pvt LtdRunning the Program (2)
  35. 35. Compiled by intellisense ITsys Pvt LtdProgram Execution Message onConsole
  36. 36. Compiled by intellisense ITsys Pvt LtdWeek 1 - Introduction to Android and Java(a) Installing Android(b) Creating Hello World(c) Running on Emulator(d) Introduction to Java Data types, Loops, Conditionals and OperatorsWeek 2 - Android Architecture and OOPS(a) Building Blocks of Android(b) Java Classes and Objects(c) Class Methods and Instances(d) Inheritance and Polymorphism in Java(e) Interface and Abstract classWeek 3 - Android UI and Advance Java(a) Using resources(b) Using themes(c) Debugging Android Code(d) Settings(e) Java I/O(e) Threads and SynchronizationAndroid Learning Schedule
  37. 37. Compiled by intellisense ITsys Pvt LtdWeek 4 - Android Graphics and Multimedia(a) Basic Graphics(b) Input Handling(c) Playing Audio(d) Playing VideoWeek 5 - Persistence in Android(a) Accessing Internal Files system(b) Acessing SD cards(c) Introduction to SQLite(d) Data Binding(e) Content ProviderWeek 6 - Network Awareness(a) Accessing the Internet(b) Using Web services(c) Using Java and Java Script(d) Location SensingAndroid Learning Schedule
  38. 38. Compiled by intellisense ITsys Pvt LtdWeek 7 - 3D graphics in OpenGL and other views(a) OpenGL Introduction(b) Using Threads and Models(c) Texture in OpenGL(d) Making a application in OpenGL(e) Other standard views in AndroidWeek 8 - Widgets and the way ahead(a) Android Widget Development(b) The Path Ahead for Android(c) Running Application on device(d) Android Market Some Do’s and Donts(e) Introduction to System programming in AndroidWeek 9 & Week 10 - Live Project(a) Design and Requirement analysis support(b) Implementation and QA supportAndroid Learning Schedule
  39. 39. Compiled by intellisense ITsys Pvt LtdThink TechknowlogicallyMSWH-new Generation ERPTechnologyKnowledgeLogic ownershipSolutionTechniqueTechknowlogical