Your SlideShare is downloading. ×
0
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
An introduction to Android
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

An introduction to Android

4,356

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,356
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
336
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • SQLite is a software library that implements a self-contained , serverless , zero-configuration , transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world.
  • EDGE 的英文全稱為 Enhanced Datarate for GSM Evolution ,中文含義為“改進數據率 GSM 服務” Compass : 羅盤
  • BSD: (二) 被授權人義務 在原始碼的重製物中一定要保有本授權條款的著作權標示內容。 以二進位制格式呈現的重製物必須再現本授權條款的著作權聲明和內容。 在沒有事前書面同意的情況下,「 the name of the 」及「 the names of its contributors 」均不得被用於支持或宣傳從既有軟體衍生出的產品(不為產品背書)。 ORGANIZATION 視使用 BSD 的使用者名稱而定。 GPL: 須明確標明對函式庫修改的日期及修改部分。 修改過的衍生著作仍得轄於 LGPL 授權條款之下,且不得向任何人以授權金的方式收取費用。
  • 提供把各種” surface” 組合在一起的能力。在這裡 surface 解釋為程式想要顯示在螢幕的東西,可能同一螢幕上有來自不同程式的內容,而這些內容有可能是 2D 顯示或是 3D 顯示等等之類。 Surface flinger 就是把這些東西結合起來,一起送到螢幕上。目前程式碼還沒公布,不過 2D 跟 3D 的混合顯示一直都是問題,根本原因是我們通常告訴 3D 顯示卡的東西都是一些「我要在哪裡哪裡畫上什麼形狀,貼上某某材質然後旋轉多少度」之類的事情,也就是說,我們並不知道最後顯示出來會長什麼樣子,那是顯 示卡上頭的 GPU 去算出來的。一般這些東西是顯示在一個有裝飾的視窗裡頭,這裝飾通常是 2D 效果。接下來假定我們想要旋轉這整個視窗,而且裡頭的東西還要繼續動,那等於要隨時把握 3D 視窗裡的東西長什麼樣子,然後把它跟 2D 的視窗框框結合,然後再開始轉動。目前在一般 GNU/Linux 上這件事情還沒有處理的非常好, Android 怎麼做,值得在程式碼公布之後注意。
  • 驅動程式就是按照硬體的規格寫的程式,用來告訴 kernel 怎麼操作這個硬體。如果驅動程式的程式碼公開,等於硬體規格也公開的差不多了。許多廠商不願意這麼做,所以就提供編好的驅動程式,但不提供原始碼。 google 他們把驅動程式移到 “ userspace” ,也就是說,把驅動程式變成在 Linux kernel 上頭跑,而不是一起跑的東西,這樣就可以避過 GPL, 然後,在 kernel 這邊開個小門,讓本來不能直接控制到硬體的 “ userspace” 程式也可以碰得到,這樣只要把「開個小門」的程式碼公佈就行啦。 這就是前文所述的 userspace 驅動程式,如果想要將 Android 在某硬體平台上執行,基本上完成這些驅動程式就行了。其內定義了 Android 對各硬體裝置例如顯示晶片、聲音、數位相機、 GPS 、 GSM 等等的需求。
  • Android 虛擬機器與函式庫合稱 Android Runtime 。它有幾個特性: 不能直接執行編譯好的 Java 程式。要轉換成 dex 檔案後才能執行。 若此程式使用了 Android 未提供的函式,仍不能執行。 若我們拿到了 Android 應用程式,無法在 Java Runtime 上跑起來。原因為 1. 必須把 dex 轉回 Java bytecode ,這難度目前不明。 2. 沒有 Android 提供的獨有函式。
  • Java + DVM
  • Transcript

    • 1. CS241001 Android Lab 2009.11.24
    • 2. <ul><li>Background </li></ul><ul><li>What is Android </li></ul><ul><ul><li>Features </li></ul></ul><ul><ul><li>Android Architecture </li></ul></ul><ul><ul><ul><li>Linux kernel </li></ul></ul></ul><ul><ul><ul><li>Native Libraries </li></ul></ul></ul><ul><ul><ul><li>Android Runtime </li></ul></ul></ul><ul><ul><ul><li>Application Framework </li></ul></ul></ul><ul><ul><ul><li>Applications </li></ul></ul></ul><ul><li>Software Development Kit (SDK) </li></ul>
    • 3. <ul><li>Wikipedia : </li></ul><ul><ul><li>An embedded system is a computer system designed to perform one or a few dedicated functions often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. </li></ul></ul><ul><ul><li>Embedded systems are controlled by a main processing core that is typically either a microcontroller or a digital signal processor (DSP). </li></ul></ul>
    • 4. &nbsp;
    • 5. <ul><li>The OHA is a group of hardware and software developers, including Google, NTT DoCoMo, Sprint Nextel, and HTC … </li></ul><ul><li>Goal </li></ul><ul><ul><li>Accelerate innovation in mobile </li></ul></ul><ul><ul><li>Offer consumers a richer, less expensive, and better mobile experience </li></ul></ul><ul><li>OHA have developed Android™, the first complete, open, and free mobile platform </li></ul>
    • 6. &nbsp;
    • 7. <ul><li>HTC Dream , T mobile G1, announced at 2008.09 </li></ul><ul><li>HTC Hero, HTC Magic, HTC Tatoo </li></ul><ul><li>SAMSUNG Galaxy i7500 </li></ul>
    • 8. <ul><li>【聯合報╱記者祁安國/台北報導】 2009/11/19 </li></ul><ul><li>中華電信昨天推出自創品牌的 Android 平台手機 CHT 8000 ,將和 HTC 英雄機一較高下,這也是繼宏達電、三星之後,國內新誕生的 Google Phone ,也將讓 Google 邁向平價化。 </li></ul><ul><li>中華電信每年採購 200 萬支手機作為門號配套促銷,這次看好 Android 手機的前景,乾脆直接找華為( Wuawei )代工,加入中華電信的設計,單機雖訂價 1 萬 3900 元,不過這支手機純屬中華電信,資費包裝上更具彈性,將從零元到低月租費都有,也讓 Android 手機售價不再高貴。 </li></ul><ul><li>CHT8000 外型跟 iPhone 類似, 3.5 吋電容觸控螢幕,也跟 iPhone 一樣內建中華電信智慧型手機專屬的客製加值服務,包括有 Hami 服務、 Hami 書城、至尊股票機、東森購物、 KKBOX 以及影視台等。中華電信行動通信分公司協理陳長榮表示,明年中華電信預估能延續今年在智慧型手機市場約有五成以上的市佔率優勢,達到 30 萬支銷售目標,其中相當看好 Android 手機市場。 </li></ul>圖/中華電信提供
    • 9. <ul><li>Android is a software stack for mobile devices that includes an operating system, middleware and key applications. </li></ul><ul><li>Android is a Java-based operating system that runs on the Linux 2.6 kernel. </li></ul><ul><li>The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language. </li></ul>
    • 10. <ul><li>Application framework enabling reuse and replacement of components </li></ul><ul><li>Dalvik virtual machine optimized for mobile devices </li></ul><ul><li>Integrated browser based on the open source WebKit engine </li></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><li>SQLite for structured data storage </li></ul>
    • 11. <ul><li>Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) </li></ul><ul><li>GSM Telephony (hardware dependent) </li></ul><ul><li>Bluetooth, EDGE, 3G, and WiFi (hardware dependent) </li></ul><ul><li>Camera, GPS, compass, and accelerometer (hardware dependent) </li></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>
    • 12. &nbsp;
    • 13. &nbsp;
    • 14. <ul><li>Android is built on the Linux kernel, but Android is not Linux </li></ul><ul><li>Provide core system services such as process, memory, power management, network stack, driver model and security </li></ul><ul><li>Does not include the full set of standard Linux utilities </li></ul><ul><li>The Android kernel source is available today </li></ul><ul><ul><li>http://git.android.com </li></ul></ul>
    • 15. &nbsp;
    • 16. <ul><li>Bionic Libc </li></ul><ul><li>Function Libraries </li></ul><ul><li>Native Servers </li></ul><ul><li>Hardware Abstraction Libraries </li></ul>
    • 17. <ul><li>C/C++ library </li></ul><ul><li>Custom libc implementation, optimized for embedded use. </li></ul><ul><li>Pros (compare with glibc) </li></ul><ul><ul><li>BSD License </li></ul></ul><ul><ul><li>Small size and fast code paths </li></ul></ul><ul><ul><li>Very fast and small custom pthread implementation </li></ul></ul><ul><li>Not compatible with Gnu Libc (glibc) </li></ul>
    • 18. <ul><li>WebKit </li></ul><ul><ul><li>Based on open source WebKit browser </li></ul></ul><ul><ul><li>Full CSS, Javascript, DOM, AJAX support </li></ul></ul><ul><li>Media Framework </li></ul><ul><ul><li>Based on PacketVideo OpenCORE platform </li></ul></ul><ul><ul><li>Supports standard video, audio, still-frame formats </li></ul></ul><ul><li>SOLite </li></ul><ul><ul><li>Light-weight transactional data store </li></ul></ul><ul><ul><li>Back end for most platform data storage </li></ul></ul>
    • 19. <ul><li>Provides system-wide surface “composer”, handling all surface rendering to frame buffer device </li></ul><ul><li>Can combine 2D and 3D surfaces and surfaces from multiple applications </li></ul>
    • 20. <ul><li>Manages all audio output devices </li></ul><ul><li>Handles audio routing to various outputs </li></ul>
    • 21. &nbsp;
    • 22. <ul><li>User space C/C++ library layer </li></ul><ul><li>Defines the interface that Android requires hardware “drivers” to implement </li></ul><ul><li>Separates the Android platform logic from the hardware interface </li></ul><ul><li>Why do we need a user-space HAL? </li></ul><ul><ul><li>Not all components have standardized kernel driver interfaces </li></ul></ul><ul><ul><li>Kernel drivers are GPL which exposes any proprietary IP </li></ul></ul><ul><ul><li>Android has specific requirements for hardware drivers </li></ul></ul>
    • 23. &nbsp;
    • 24. <ul><li>Application Developed language : Java </li></ul><ul><li>Dalvik Virtual Machine </li></ul><ul><ul><li>Instruvtion set : Dalvik Excutable </li></ul></ul><ul><li>Java Standard Library </li></ul><ul><ul><li>Compile java code to Dalvik Excutable (dex format) </li></ul></ul>
    • 25. <ul><li>Android custom implementation virtual machine </li></ul><ul><ul><li>Provides application portability and runtime consistency </li></ul></ul><ul><ul><li>Runs optimized file format (.dex) and Dalvik bytecode </li></ul></ul><ul><ul><li>Java .class / .jar files converted to .dex at build time </li></ul></ul><ul><li>Designed for embedded environment </li></ul><ul><ul><li>Supports multiple virtual machine processes per device </li></ul></ul><ul><ul><li>Highly CPU-optimized bytecode interpreter </li></ul></ul><ul><ul><li>Efficiently Using runtime memory </li></ul></ul><ul><li>Core Libraries </li></ul><ul><ul><li>Core APIs for Java language provide a powerful, yet simple and familiar development platform </li></ul></ul>
    • 26. <ul><li>DVM </li></ul><ul><ul><li>Google </li></ul></ul><ul><ul><li>Dalvik excutable </li></ul></ul><ul><li>JVM </li></ul><ul><ul><li>Sun </li></ul></ul><ul><ul><ul><li>Java bytecode </li></ul></ul></ul><ul><li>What else ? </li></ul>
    • 27. &nbsp;
    • 28. <ul><li>Activity manager </li></ul><ul><ul><li>Manage the life cycle of applications </li></ul></ul><ul><li>Content Provider </li></ul><ul><ul><li>Share data between applications </li></ul></ul><ul><li>Resource Manager </li></ul><ul><ul><li>Manager non-code resource </li></ul></ul><ul><li>Notification Manager </li></ul><ul><ul><li>Display custom alerts in the status bar </li></ul></ul><ul><li>Views System </li></ul><ul><ul><li>A rich and extensible set, which can construct UI </li></ul></ul>
    • 29. &nbsp;
    • 30. <ul><li>Use the powerful and flexible application framework to develop your application </li></ul><ul><li>Written by JAVA programming language </li></ul>
    • 31. <ul><li>IDE – Eclipse </li></ul><ul><li>Eclipse plug-in - ADT </li></ul><ul><li>Software Development Kit (SDK) </li></ul><ul><li>Android Emulator </li></ul><ul><li>Debuger </li></ul>
    • 32. &nbsp;
    • 33. <ul><li>The Android SDK includes a variety of custom tools that help you develop mobile applications on the Android platform. </li></ul><ul><ul><li>Android Emulator </li></ul></ul><ul><ul><li>Android Development Tools Plugin (for the Eclipse IDE) </li></ul></ul><ul><ul><li>Android Virtual Devices (AVDs) </li></ul></ul><ul><ul><li>Hierarchy Viewer </li></ul></ul><ul><ul><li>Android Debug Bridge (adb) </li></ul></ul>
    • 34. <ul><li>Virtual mobile device </li></ul><ul><li>QEMU-based ARM emulator </li></ul><ul><li>Design application in an actual Android runtime environment </li></ul><ul><ul><li>Use the same toolchain </li></ul></ul><ul><ul><li>Run the same binary </li></ul></ul>
    • 35. &nbsp;

    ×