Introduction to Android

1,329 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,329
On SlideShare
0
From Embeds
0
Number of Embeds
29
Actions
Shares
0
Downloads
28
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Introduction to Android

  1. 1. By Vishwesh Jirgale Persistent Systems Ltd. Manager – Pune Google Technology Users Group
  2. 2. What’s so special about Android ? <ul><ul><li>How Android is different to other Platforms including Windows Mobile, Symbian/S60/UIQ, and proprietary (Nucleus, EMP, BREW, etc): </li></ul></ul><ul><ul><ul><li>Java as programming language, and not restricting to Java ME, so giving a broader set of libraries for developers. Much like SavaJe (now Sun’s Java FX Mobile), Android is a Java SE -like  platform built on a Linux kernel, but more importantly one where the Java platform is deeply integrated with the underlying Linux support package </li></ul></ul></ul><ul><ul><ul><li>Funny thing - Google doesn’t claim that Android is a Java platform, although it can run some programs written with the Java language and against some derived version of the Java class library. Because they use Dalvik , a ‘proprietary’ (non-Sun-endorsed) Java virtual machine which means that Android developers can use Java SE APIs, while Google does not have to pay any royalties to Sun for TCK certification </li></ul></ul></ul><ul><ul><ul><li>The  declarative XML UI framework  enables developers and handset manufacturers to rapidly develop the user interface for new applications. </li></ul></ul></ul><ul><ul><ul><li>The Android SDK is an environment for building connected applications. Every application (including dialler, idle screen, SMS, contacts, etc) can consume and produce content. Every application on Android is a Web 2.0 citizen . </li></ul></ul></ul><ul><ul><ul><li>The Android source code will be licensed under the Apache 2.0 license , a non-copyleft license which allows handset manufacturers to modify the source code without being forced to share back their modifications .  </li></ul></ul></ul>
  3. 3. Aah… You are a developer first !!! A developer's perspective on Google's Android
  4. 4. What Is Android? <ul><ul><li>Android is a complete software stack for mobile devices such as cell phones, PDAs and high end MP3 players. The software stack is split into four layers : </li></ul></ul><ul><ul><ul><li>The application layer </li></ul></ul></ul><ul><ul><ul><li>The application framework </li></ul></ul></ul><ul><ul><ul><li>The libraries and runtime </li></ul></ul></ul><ul><ul><ul><li>The kernel </li></ul></ul></ul><ul><ul><li>Cell phone users obviously work with applications in the application layer. Android developers write those applications using the application framework. </li></ul></ul><ul><ul><li>Interesting - Unlike many embedded operating environments, Android applications are all equal -- that is, the applications that come with the phone are no different than those that any developer writes. </li></ul></ul>
  5. 5. Android Architecture
  6. 6. Android Architecture <ul><ul><li>Applications </li></ul></ul><ul><ul><ul><li>Android will ship with a set of core applications including an email client, SMS program, calendar, maps, browser, contacts, and others. All applications are written using the Java programming language. </li></ul></ul></ul><ul><ul><li>Application Framework </li></ul></ul><ul><ul><ul><li>Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of components; any application can publish its capabilities and any other application may then make use of those capabilities (subject to security constraints enforced by the framework). This same mechanism allows components to be replaced by the user. </li></ul></ul></ul><ul><ul><li>Libraries </li></ul></ul><ul><ul><ul><li>Android includes a set of C/C++ libraries used by various components of the Android system. These capabilities are exposed to developers through the Android application framework. </li></ul></ul></ul><ul><ul><li>Android Runtime </li></ul></ul><ul><ul><ul><li>Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language. </li></ul></ul></ul><ul><ul><li>Linux Kernel </li></ul></ul><ul><ul><ul><li>Android relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack. </li></ul></ul></ul>
  7. 7. Android’s features <ul><ul><li>Dalvik virtual machine optimized for mobile devices </li></ul></ul><ul><ul><li>Integrated browser based on the open source WebKit engine </li></ul></ul><ul><ul><li>Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional) </li></ul></ul><ul><ul><li>SQLite for structured data storage </li></ul></ul><ul><ul><li>Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) </li></ul></ul><ul><ul><li>GSM Telephony (hardware dependent) </li></ul></ul><ul><ul><li>Bluetooth, EDGE, 3G, and WiFi (hardware dependent) </li></ul></ul><ul><ul><li>Camera, GPS, compass, and accelerometer (hardware dependent) </li></ul></ul><ul><ul><li>Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE </li></ul></ul>
  8. 8. For developers – What all I need ? <ul><ul><li>Supported Operating Systems </li></ul></ul><ul><ul><ul><li>Windows XP or Vista </li></ul></ul></ul><ul><ul><ul><li>Mac OS X 10.4.8 or later (x86 only) </li></ul></ul></ul><ul><ul><ul><li>Linux (tested on Linux Ubuntu Dapper Drake) </li></ul></ul></ul><ul><ul><li>Other than Android SDK you will need - </li></ul></ul><ul><ul><ul><li>Eclipse IDE </li></ul></ul></ul><ul><ul><ul><ul><li>Eclipse 3.2, 3.3 (Europa) </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Eclipse JDT plugin (included in most Eclipse IDE packages) </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>WST (optional, included in most Eclipse IDE packages ) </li></ul></ul></ul></ul></ul><ul><ul><ul><li>JDK 5 or JDK 6 (JRE alone is not sufficient) </li></ul></ul></ul><ul><ul><ul><li>Not compatible with Gnu Compiler for Java (gcj) </li></ul></ul></ul><ul><ul><ul><li>Android Development Tools plugin (optional) </li></ul></ul></ul>
  9. 9. What's inside SDK ?
  10. 10. What's inside SDK ? <ul><ul><li>android.jar - The Android application framework. Unzipping this jar reveals the entire class structure and all of the supporting classes of the framework. Currently there is no source. </li></ul></ul><ul><ul><li>docs - 100 megabytes worth of documentation, samples, etc. </li></ul></ul><ul><ul><li>samples - Six different sample applications - ApiDemos, HelloActivity, LunarLander, NotePad, SkeletonApp and Snake </li></ul></ul><ul><ul><li>tools - the various SDK binaries such as aapt, acp, and emulator live here. </li></ul></ul><ul><ul><ul><li>lib - various templates and supporting jar files live in this directory </li></ul></ul></ul><ul><ul><ul><ul><li>activityCreator - the activityCreator python application lives here. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>images - The Linux file system images are found in this directory: ramdis.img, system.img and userdata.img. They are YAFFS2 file system images. </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>skins - supporting emulator graphics for HVGA and QVGA screens in both landscape and portrait format. </li></ul></ul></ul></ul></ul>
  11. 11. Write My First Android App – How about “Hello Android” <ul><ul><li>Ok show me - </li></ul></ul>
  12. 12. Application Building Blocks <ul><ul><li>AndroidManifest.xml </li></ul></ul><ul><ul><ul><li>The AndroidManifest.xml file is the control file that tells the system what to do with all the top-level components (specifically activities, services, intent receivers, and content providers described below) you've created. For instance, this is the &quot;glue&quot; that actually specifies which Intents your Activities receive. </li></ul></ul></ul><ul><ul><li>Activities </li></ul></ul><ul><ul><ul><li>An Activity is, fundamentally, an object that has a life cycle. An Activity is a chunk of code that does some work; if necessary, that work can include displaying a UI to the user. It doesn't have to, though - some Activities never display UIs. Typically, you'll designate one of your application's Activities as the entry point to your application. </li></ul></ul></ul><ul><ul><li>Views </li></ul></ul><ul><ul><ul><li>A View is an object that knows how to draw itself to the screen. Android user interfaces are comprised of trees of Views. If you want to perform some custom graphical technique (as you might if you're writing a game, or building some unusual new user interface widget) then you'd create a View. </li></ul></ul></ul><ul><ul><li>Intents </li></ul></ul><ul><ul><ul><li>An Intent is a simple message object that represents an &quot;intention&quot; to do something. For example, if your application wants to display a web page, it expresses its &quot;Intent&quot; to view the URI by creating an Intent instance and handing it off to the system. The system locates some other piece of code (in this case, the Browser) that knows how to handle that Intent, and runs it. Intents can also be used to broadcast interesting events (such as a notification) system-wide. </li></ul></ul></ul>
  13. 13. Application Building Blocks <ul><ul><li>Services </li></ul></ul><ul><ul><ul><li>A Service is a body of code that runs in the background. It can run in its own process, or in the context of another application's process, depending on its needs. Other components &quot;bind&quot; to a Service and invoke methods on it via remote procedure calls. An example of a Service is a media player; even when the user quits the media-selection UI, she probably still intends for her music to keep playing. A Service keeps the music going even when the UI has completed. </li></ul></ul></ul><ul><ul><li>Notifications </li></ul></ul><ul><ul><ul><li>A Notification is a small icon that appears in the status bar. Users can interact with this icon to receive information. The most well-known notifications are SMS messages, call history, and voicemail, but applications can create their own. Notifications are the strongly-preferred mechanism for alerting the user of something that needs their attention. </li></ul></ul></ul><ul><ul><li>ContentProviders </li></ul></ul><ul><ul><ul><li>A ContentProvider is a data storehouse that provides access to data on the device; the classic example is the ContentProvider that's used to access the user's list of contacts. Your application can access data that other applications have exposed via a ContentProvider, and you can also define your own ContentProviders to expose data of your own. </li></ul></ul></ul>
  14. 14. Applications already available <ul><ul><li>Maps Applications </li></ul></ul><ul><ul><ul><li>Driving Directions </li></ul></ul></ul><ul><ul><ul><li>Friend Locator </li></ul></ul></ul><ul><ul><ul><li>Hotel Locator </li></ul></ul></ul><ul><ul><li>System Applications </li></ul></ul><ul><ul><ul><li>Task Manager </li></ul></ul></ul><ul><ul><ul><li>File Browsers </li></ul></ul></ul><ul><ul><ul><li>SD Card emulators </li></ul></ul></ul><ul><ul><ul><li>Bluetooth emulation </li></ul></ul></ul><ul><ul><ul><li>Remote Camera Streaming </li></ul></ul></ul><ul><ul><ul><li>Telnet Client </li></ul></ul></ul><ul><ul><li>Web Applications </li></ul></ul><ul><ul><ul><li>Android Weather Forceaster which uses Google Weather API </li></ul></ul></ul><ul><ul><ul><li>XML RPC Client for Android </li></ul></ul></ul><ul><ul><li>Other </li></ul></ul><ul><ul><ul><li>Android Dictionary (Eng <-> Chinese) </li></ul></ul></ul><ul><ul><ul><li>Caltrain Schedule </li></ul></ul></ul><ul><ul><li>UI Designer </li></ul></ul><ul><ul><ul><li>Droid draw </li></ul></ul></ul>
  15. 15. Hummer Phone
  16. 16. Levi’s Phone
  17. 17. References and further reading <ul><ul><li>http://code.google.com/android </li></ul></ul><ul><ul><li>http://www.anddev.org </li></ul></ul><ul><ul><li>Multiple blog sites </li></ul></ul><ul><ul><li>Further Reading </li></ul></ul><ul><ul><li>http://code.google.com/android/toolbox/ </li></ul></ul><ul><ul><li>Test Driven Development and GUI Testing on the Android platform: http://dtmilano.blogspot.com/2008/01/test-driven-development-and-gui-testing.html </li></ul></ul>
  18. 18. News <ul><ul><li>Texas Instrument demonstrated its Android Mobile platform at Mobile World Congress in Barcelona. Its on TI’s OMAP 850 processor </li></ul></ul><ul><ul><li>It has WiFi, Bluetooth wireless, Web Browsing, send emails, check your gmail account and of course make and receive calls. </li></ul></ul><ul><ul><li>Some Pics - </li></ul></ul>
  19. 19. Thank You Questions? You can reach me at- [email_address]

×