Mobile Application Development-Android OS: An Open Platform For Mobile Devices
Mobile Application Development-Android OS: An Open Platform For Mobile Devices
What To Expect
Mobile Computing Mobile Application Development (MAD) Android Platform & Features Android Architecture & its advantages Application Development Tools Application Design Considerations Application Building Blocks Hello Android Application
Mobile Computing
1. Mobile communication
The first aspect addresses communication issues in adhoc and infrastructure networks as well as communication properties, protocols, data formats and concrete technologies. The second aspect focuses on the hardware, i.e. mobile devices or device components. The third aspect deals with the characteristics and requirements of mobile applications.
What is Android ?
A software stack for mobile devices that includes an operating system, middleware and key applications. A Java-based operating system that runs on the Linux 2.6 kernel. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language .
What is Android ?
A free, open source S/W under Apache v2 License Industry can add proprietary functionality to their products without giving anything back to the platform Companies can remove functionality if they choose A Linux-based, multiprocess, multithreaded OS Android is not a device or a product Its not even limited to phones - you could build a DVR, a handheld GPS, an MP3 player, etc.
Android
Key Applications Middleware
What is Android ?
Why Android ?
to develop open standards for mobile devices Goal is to Accelerate innovation in mobile and offer consumers a richer, less expensive, and better mobile experience
Members of OHA
Android: How it was created
Software Companies
Semiconductor Companies
Commercialization Companies
13
Android is growing
Uneven distribution of OS by regions
replacement of components Dalvik virtual machine optimized for mobile devices Integrated browser based on the open source WebKit engine Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional) SQLite for structured data storage
dependent)
LAN : Bluetooth, and Wi-Fi (hardware dependent) Graphics Hardware Acceleration Camera, GPS and Compass (hardware dependent)
College Of Engineering Chengannur 18
Android OS Architecture
Architecture
Middleware Libraries (i.e. SQLite, OpenGL, WebKit, etc) Android Runtime (Dalvik Virtual Machine and core libraries) Application Framework Linux Kernel: (Abstraction for hardware access) manages application resources and the UI; provides classes for developing applications for Android Applications Native apps: Contacts, Phone, Browser, etc. Third-party apps: developers applications.
Linux Kernel
Android Architecture
software stack Why Linux? Proven driver model and has existing drivers Has memory management, security management, networking, core OS infrastructure, etc. Robust and already has been proven over time
21
Libraries
Android Architecture
22
Libraries
Android Architecture
Responsible for composing different drawing surfaces (ex: diff. windows/applications/process all drawing at the same time) to the screen
Make up the core of the graphics library. OpenGL (3D graphics engine) SGL (2D graphics engine) Can combine 3D and 2D graphics in the same application 23
Libraries
Android Architecture
24
Libraries
Android Architecture
An open source browser engine. Used as the core of the browser which is the same browser powering Safari.
25
Android Runtime
Android Architecture
Main Component: Dalvik Virtual Machine Optimized for running in an embedded environment (limited memory, CPU, battery) Runs .dex files (bytecodes)
.class .jar files
26
Android Runtime
Android Architecture
Core Library Contains all the collection classes, utilities, IO, etc.
27
Application Framework
Android Architecture
28
Application Framework
Android Architecture
Keeps track what applications are installed in device Manages Windows Contains APIs used to build the phone application 29
Application Framework
Android Architecture
Allows applications to share data with other applications (ex: contact info is available to others)
30
Application Framework
Android Architecture
Allows applications to communicate between devices through GtalkService. GtalkService maintains a persistent socket connection, therefore the response time is fasterthan SMS.
31
Applications
Android Architecture
Core Applications Email client SMS program Calendar Maps Browser Contacts etc
32
Open
Android is...
Allows access to core mobile device functionality through standard API calls Example Application can call core functionality such as making calls, sending text messages, using camera... Developers can create richer and more cohesive experiences for users Since it's open source, it can be liberally extended as new technologies emerge
33
Consumers Cheaper mobile devices More innovative mobile devices and services Easier-to-use user interfaces Rich portfolio of applications Mobile Operators Lower overall cost of handsets They will have complete flexibility to customize and differentiate their product lines More rapid innovation in handsets and services
34
Handset manufacturers Lower software BOM (bill of material) costs Faster time-to-market for handset Greater flexibility to customized and differentiate product offerings Software companies Allow simplified integration of software components into a complete mobile platform More income for them Handset manufacturers will invest in high value and differentiated software components since there are lower acquisition costs in the mobile platform
35
Semiconductor companies As cellphone-on-a-chip becomes a reality Semiconductor companies will need to access more sophisticated software that take advantage of the enhanced features (3D graphics, signal processor cores, dedicated blocks of multimedia acceleration etc) An open platform will give support to these new peripherals in the platform and will allow semiconductor companies to give 3rd party developers access to these enhanced features in a timely manner
36
Developers Able to innovate rapidly because they will have comprehensive API access to handset capabilities that are web-ready Increase productivity Comprehensive and easy-to-use developer tools Deeper understanding of the underlying platform will lead them to better optimize their applications Distribution and commercialization of mobile applications will be less expensive and easier
37
Android does not differentiate between the phone's basic and third party applications All applications have equal access to the phone's capabilities Example: The dialer and home screen can be replaced
38
Information from the web can be combined with data on the phone Example: Contacts, calendar or geographic location
39
SDK (Software development kit) includes True device emulator and advanced debugging tools Useful libraries and tools Example Obtain location of the device Allow devices to communicate with one another
40
Android Development
What do you need for Android application development?
Operating System: MS Windows (>= XP), Mac OS X >= 10.4.8, Linux Android SDK (including Android Emulator]
JDK >= 5 Android Development with Eclipse: Eclipse (+ Java Development Tools plug-in and Web Tools Platform) + Android Development Tools plug-in
Development Tools
The Android SDK includes a variety of custom tools that help you develop mobile applications on the Android platform.Three of the most significant tools are: College Of Engineering Chengannur
1. Android Emulator
-A virtual mobile device that runs on our computer - use to design, debug, and test our applications in an actual Android run-time environment -for the Eclipse IDE - adds powerful extensions to the Eclipse integrated environment (DDMS) 42 Integrated with Dalvik -this tool let us manage processes on an emulator and assists in debugging
3. Dalvik
Debug
Monitor
Service
Development Environment
+ ADT plugin
Design your application to be responsive to a slow (sometimes non-existent), intermittent network connection
Services:
Components that run in the background Do not interact with the user Can update your data sources and Activities, and trigger specific notifications
Intents
Specify what intentions you have in terms of a specific action being performed
Broadcast Receivers
Listen for broadcast Intents that match some defined filter criteria Can automatically start your application as a response to an intent
Application Lifecycle
To free up resources, processes are being killed based on their priority:
Critical Priority:
foreground (active) processes; Foreground activities; components that execute an onReceive event handler; services that are executing an onStart, onCreate, or onDestroy event handler.
High Priority:
visible (inactive) processes and started service processes; Partially obscured activity (lost focus); services started.
Low Priority:
background processes: Activities that are not visible; activities with no started service
Activity Lifecycle
Activities are managed as an activity stack (LIFO collection).
Running: Activity is in the foreground Paused: Activity has lost focus but it is still visible Stopped:
Activity is not visible (completely obscured by another activity) Activity has not been launched yet or has been killed.
Inactive:
Hello Android
A Peek at an Android App
50
Hello Android
A Peek at an Android App
51
Hello Android
A Peek at an Android App
52
Conclusion
Android is open to all: industry, developers and users Participating in many of the successful open source projects Aims to be as easy to build for as the web.
College Of Engineering Chengannur 53
Contact Me
http://rksingla.puchd.ac.in
THANK YOU
For your attention