Android 1 PPT
-
Upload
vikrant-nandakumar -
Category
Documents
-
view
817 -
download
0
Transcript of Android 1 PPT
Android Development Workshop Part - 1Ritesh Ambastha
Rajnikant Joshi
12th March
What is Android?
• Android is a mobile phone operating system developed by Google.
• Android is unique becauseGoogle is actively developingthe platform by giving it awayfor free to hardwaremanufacturers and phonecarriers who want to useAndroid on their devices.
Open Handset Alliance (OHA)
• Google formed a group ofhardware, software, andtelecommunication companiescalled the Open Handset Alliancewith the goal of contributing toAndroid development.
• Most members also have thegoal of making money fromAndroid, either by selling phones,phone service, or mobileapplications.
SDK and Android Market Place
• Anyone can download the SDK (softwaredevelopment kit) and write applications forAndroid phones. Google doesn't take part ofthe profits.
• These apps can be downloaded fromthe Android Market Place. If the app costsmoney, you pay for it using Google Checkout.
Google Services
• Because Google developedAndroid, it comes with a lot ofGoogle services installed right outof the box.
• Gmail, Google Calendar, andGoogle Web search are all pre-installed, and Google is also thedefault Web page for the Webbrowser.
Introduction to Android Platform
• Android is an open software platform for mobile development.It’s intended to be a complete stack that includes everythingfrom the Operating System through middleware up throughapplications.
Android Architecture
• If I'm going to talk about architecture, we need to start with a diagram covered with a lot of little boxes.
Linux Kernel
• The architecture is based on the Linux 2.6 kernel. Androiduse Linux kernel as its hardware abstraction layer.
• The reason they're using Linux is because it provides aproven driver model in a lot of cases existing drivers.
• It also provides memory management, processmanagement, a security model, and networking,a lot of core operating system infrastructures that arerobust and have been proven over time.
Native Libraries
• The next level up is the native libraries.Everything that you see here in green iswritten in C and C++.
• It's at this level where a lot of the core powerof the Android platform comes from.
Native Libraries: Surface Manager
• The surface manager is responsible for composing differentdrawing surfaces onto the screen.
• So it's the surface manager that's responsible for takingdifferent windows that are owned by different applicationsthat are running in different processes and all drawing atdifferent times and making sure the pixels end up on thescreen when they're supposed to.
Native Libraries: OpenGL|ES and SGL
• OpenGL/ES is a 3D library.
• They have a software implementation that is hardware acceleratable if the device has a 3D chip on it.
• The SGL graphics are for 2D graphics and that is what most of the application drawing is based on.
• One interesting thing about the Android graphics platform is that you can combine 3D and 2D graphics in the same application.
Native Libraries: Media Framework
• The Media Framework was provided by PacketVideo, one of the members of the open handset alliance and that contains the entire codex that make up the core of the media experiences.
• So, in there you'll find IMPEG 4, H.264, MP3, AAC, all theaudio and video codex you need to build a rich mediaexperience.
Native Libraries: FreeType & SQLite
• FreeType
• They use FreeType to render our fonts. FreeType is a free, high-quality and portable font engine.
• SQLite
• They have an implementation of SQLite, it uses that as the core of most of its data storage.
Native Libraries: WebKit
• They have WebKit which is the open source browserengine, that's what they're using as a core ofAndroid’s browser.
• It's the same browser that's powering Safari fromApple and they’ve worked with that engine to makeit render well on small screens and on mobiledevices.
Android Run Time
• The Android Runtime was designed specifically for Android to meetthe needs of running in an embedded environment where you havelimited battery, limited memory, limited CPU.
• The DVM runs something called dex files, D-E-X. and these arebytecodes that are the results of converting at build time .Class and.JAR Files.
• So, these files when they are converted to .dex, become a muchmore efficient bytecode that can run very well on small processors.They use memory very efficiently.
Android Run Time
• The next level up from that is the Core Libraries.
• This is in blue, meaning that it's written in the Javaprogramming language.
• And the core library contains all of the collection classes,utilities, IO, all the utilities and tools that you’ve come toexpected to use.
Application Framework
• This is all written in a Java programming language and the application framework is the toolkit that all applications use.
• These applications include the ones that come with a phone like the home applications, or the phone application.
• It includes applications written by Google, and it includes apps that will be written by you.
• So, all apps use the same framework and the same APIs.
Application Framework
• Activity Manager• The Activity manager is what manages the life cycle of the applications. It
also maintains a common backstack so that application that is running in different processes can have a smoothly integrated navigation experience.
• Package Manager• The package manager is what keeps track of which applications are
installed on your device. So, if you download new applications over the air or otherwise install apps, it's the package manager that's responsible for keeping track of what you have and what the capabilities of each of your applications are.
Application Framework
• Window Manager• The window manager manages Windows. It's mostly a java
programming language abstraction on top of lower level services that are provided by the surface manager.
• Telephony Manager• The telephony manager contains the APIs that we use to build the
phone application that's central to the phone experience.
Application Framework
• Content Providers• Content providers are a unique piece of the Android platform. That's
the framework that allows applications to share their data with other applications.
• The View system • View System contains things like buttons and lists, all the building
blocks of the UI. It also handles things like event dispatching, layout drawing, .
Application Framework
• The resource manager is what they use to store local iStrings, bitmaps, layout file descriptions, all of the external parts of an application that aren't code.
• Location manager, notification manager and XMPP service are some APIs that I think will allow developers to create really innovative and exciting applications.
Applications
• And the final layer on top is Applications.
• This is where all the applications get written.
• It includes the home application, the contacts application, the browser, and your apps.
• And everything at this layer is, again, using the same app framework provided by the layers below.
• Now, if you're going to write an app, the first step is todecompose it into the components that are supported bythe Android platform.
• UI component typically corresponding to one screen.Activity
• Responds to notification or status changes. Can wake up your process.Intent Receiver
• Faceless task that runs in the background.Service
• Enable applications to share dataContent Provider
Application Building Blocks
Application Building Blocks
• An activity is essentially just a piece of UI typically corresponding toone screen.
• So if you think of something like the mail application, that wouldbe decomposed into maybe three major activities, something thatlists your mail, something that shows you what an individualmessage and a compose screen to put together an outgoing email.
Activity
Application Building Blocks
• An intent receiver is a way for which yourapplication to register some code that won'tbe running until it's triggered by someexternal event.
• And the set of external events that triggersyour code is open and extensible.
Intent Receiver
Application Building Blocks
• A service is a task that doesn't have any UI, that'slong lived, that's running in the background.
• A good example is a music player. You may startplaying music from an activity, from a piece of UI,but once the music is playing, you'd want it tokeep playing even if you're navigating to otherparts of the user experience.
Service
Application Building Blocks
• It is a component that allows you to share some of your data with other processes and other applications.
• Now, any application can store data in whatever may-way it makes sense for that application.
• They can store it in the files.
• They can store it in Android’s super light database, whatever makes sense.
Content Provider
Application Lifecycle
• Applications run in their own processes
• Processes are started and stopped asneeded to run an application's components
• Processes may be killed to reclaim resources
• In android, every application runs in its own process. There's a lot ofbenefits to this. It gives you security, protected memory. It meansthat an application is doing something CPU intensive, won't blockother critical activities, like, answering a phone.
• So all applications are running in their own processes and theAndroid System itself is responsible for starting these proecesses andshutting them down as necessary to reclaim resources.
Application Lifecycle
Installations&
Configuration
Next PPT…