SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
Android Programming &
                       Application
                           Chien-Chung Wu (吳建中), Ph. D.

                                  Associate Professor
                   Dept. Computer Science and Information Engineering
                       Southern Taiwan University of Technology



                                嵌入式暨智慧機器人應用實驗室
                                  http://eiral.csie.stut.edu.tw/




                                    Agenda
           • SmartPhones
              – Symbian, Android, iPhone, Mobile, BlackBerry
              – Comparison with Apps Store (Market)
              – Comparison with Development Environment
           • Which is the winner?
           • Android History and Applications
           • Android Programming-Application and
             Framework
           • References
                                嵌入式暨智慧機器人應用實驗室
                                  http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                        1
Agenda
           • SmartPhones
              – Symbian, Android, iPhone, Mobile, BlackBerry
              – Comparison with Apps Store (Market)
              – Comparison with Development Environment
           • Which is the winner?
           • Android History and Applications
           • Android Programming-Application and
             Framework
           • References
                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




             Smartphone rank by Different OS




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               2
Smart Phone Sales By OS




                    資料來源:http://gigaom.com/2010/03/18/the-mobile-os-market/
                                  嵌入式暨智慧機器人應用實驗室
                                    http://eiral.csie.stut.edu.tw/




                The Smart Phone OS Market




                    資料來源:http://gigaom.com/2010/03/18/the-mobile-os-market/
                                  嵌入式暨智慧機器人應用實驗室
                                    http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                              3
Agenda
           • SmartPhones
              – Symbian, Android, iPhone, Mobile, BlackBerry
              – Comparison with Apps Store (Market)
              – Comparison with Development Environment
           • Which is the winner?
           • Android History and Applications
           • Android Programming-Application and
             Framework
           • References
                               嵌入式暨智慧機器人應用實驗室
                                 http://eiral.csie.stut.edu.tw/




                      Apps store (market)
           • RIM BlackBerry app world

           • Microsoft Mobile Market Place

           • Nokia Ovi Store

           • Google Android market

           • Apple iPhone app store

                               嵌入式暨智慧機器人應用實驗室
                                 http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                  4
RIM BlackBerry App World




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                        Nokia Ovi Store




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               5
Google Android Market




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                   Apple iPhone App Store




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               6
Microsoft Mobile Marketplace




                                  嵌入式暨智慧機器人應用實驗室
                                    http://eiral.csie.stut.edu.tw/




                                 OS vs. Apps




                    資料來源:http://www.sogi.com.tw/newforum/article_list.aspx?topic_id=6108341


                                  嵌入式暨智慧機器人應用實驗室
                                    http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                                              7
Agenda
           • SmartPhones
              – Symbian, Android, iPhone, Mobile, BlackBerry
              – Comparison with Apps Store (Market)
              – Comparison with Development Environment
           • Which is the winner?
           • Android History and Applications
           • Android Programming-Application and
             Framework
           • References
                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




             Development Environment Tools
           • Nokia Symbian

           • Apple iPhone

           • Microsoft Mobile

           • Google Android
                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               8
Development Environment Tools
                        (Symbian)
           • Active Perl Script
           • Java
           • Carbide.c++
           • 3rd Edition Maintenance Release版本的S60
             SDK
           • Extensions plug-in for S60 5th Edition SDK
             for Symbian OS, for C++, MR的擴展插件

                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




               Development Environment Tools
                         (iPhone)
           • Mac OS
           • iPhone Dev Center
           • Need Apple ID




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               9
Development Environment Tools
                         (Mobile)
           • .Net 2003/2005/2008
           • Platform builder (for 4.2 and 5.0 only)
           • .NET Compact Framework




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




               Development Environment Tools
                        (Android)
           • JDK5 or JDK6 version
           • Eclipse IDE (3.3 or higher)
           • Android Development Tools plugin




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               10
Agenda
           • SmartPhones
              – Symbian, Android, iPhone, Mobile, BlackBerry
              – Comparison with Apps Store (Market)
              – Comparison with Development Environment
           • Which is the winner?
           • Android History and Applications
           • Android Programming-Application and
             Framework
           • References
                                    嵌入式暨智慧機器人應用實驗室
                                      http://eiral.csie.stut.edu.tw/




                        Which is the winner?
           • Royalty?

           • Price?

           • Open Source?

           • Apps quantities?

           • Functions?         資料來源:http://www.sogi.com.tw/newforum/article_list.aspx?topic_id=6108341



           • UI?
                                    嵌入式暨智慧機器人應用實驗室
                                      http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                                                          11
Agenda
               • SmartPhones
                 – Symbian, Android, iPhone, Mobile, BlackBerry
                 – Comparison with Apps Store (Market)
                 – Comparison with Development Environment
               • Which is the winner?
               • Android History and Applications
               • Android Programming-Application and
                 Framework
               • References
                                嵌入式暨智慧機器人應用實驗室
                                  http://eiral.csie.stut.edu.tw/




                     Android 1.5 (Cupcake)
           •    2009年4月30日,官方1.5版本(Cupcake)
           •    Linux Kernel 2.6.27
           •    拍攝/回放視訊,並支援上傳到youtube
           •    支援立體聲藍牙耳機,同時改善自動配對性能
           •    最新的採用WebKit技術的瀏覽器,支援拷貝/粘帖
                和頁面中搜尋
           •    GPS性能大大提高
           •    螢幕虛擬鍵盤
           •    主螢幕增加音樂播放器和相框widgets
           •    應用程式自動隨著手機旋轉                HTC Dream
           •    簡訊,Gmail,日歷,瀏覽器的用戶介面大幅改
                善,比如說Gmail現在可以批量刪除郵件了              HTC Magic
           •    相機啟動速度加快,拍攝圖片可以直接上傳到                         HTC Hero
                picasa
           •    來電照片顯示

                                嵌入式暨智慧機器人應用實驗室
                                  http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                        12
Android 1.6 (Donut)
              •    2009年9月15日, 1.6(Donut)版本SDK
                   發佈。
              •    Linux Kernel 2.6.29
              •    完全重新設計的Android Market
              •    手勢支援
              •    支援CDMA網路
              •    文字轉語音系統(TXT-2-speech)
              •    快速搜尋框
              •    全新的拍照介面
              •    應用程式耗電檢視
              •    支援VPN
              •    支援更多的螢幕解析度
                                                               Acer Liquid
              •    支援OpenCore2媒體引擎
              •    新增面向視覺或聽覺困難人群的易用
                   性外掛程式
                                                                             HTC Tattoo


                                      嵌入式暨智慧機器人應用實驗室
                                        http://eiral.csie.stut.edu.tw/




                      Android 2.0/2.01/2.1 (Eclair)
          •       2009年10月26日, 2.0(Eclair)版本SDK發
                  佈。
          •       Linux Kernel 2.6.29
          •       優化硬體速度
          •       "Car Home“---voice-controlled car
                  accessibility
          •       支援更多的螢幕解析度
          •       重整介面
          •       新的瀏覽器的用戶介面和支援HTML5                                             HTC Legend
          •       新的聯繫人名單                                                          (2.1)
          •       更好的白色/黑色背景比率
          •       改進Google Maps 3.1.2               MOTO MILESTONE
          •       支援Microsoft Exchange                   (2.0)
          •       支援內置相機閃光燈
          •       數位變焦
          •       改進的虛擬鍵盤
          •       藍牙2.1
                                      嵌入式暨智慧機器人應用實驗室                              Samsung I8250
                                        http://eiral.csie.stut.edu.tw/
                                                                                      (2.1)




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                                                  13
Android 2.2 (Froyo)
           •    2010年5月20日 Android 2.2(Froyo)版
                本SDK發佈。
           •    Linux Kernel 2.6.32
           •    支援安裝軟體來擴展內存
           •    手機與筆記型電腦共享網絡連接
           •    整合Adobe Flash 10.1支援
           •    加強軟體即時編譯的速度
           •    新增軟體啟動"快速"至電話和瀏覽器
           •    USB分享器和WiFi熱點功能
           •    支援在瀏覽器上傳檔案
           •    更新Market中的"batch"和自動更新
           •    增加對Microsoft Exchange的支援 (安
                全政策, auto-discovery, GAL look-up)
           •    整合Chrome的V8 JavaScript引擎應用
                到瀏覽器
           •    加強快速搜尋小工具


                                       嵌入式暨智慧機器人應用實驗室
                                         http://eiral.csie.stut.edu.tw/




                                    Android Apps
               • Download by Androids Market

               • Download by AndAppStore

               • Download by QR Code

               • Download by S市集

               • …

                                       嵌入式暨智慧機器人應用實驗室
                                         http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                          14
Barcode Scanner
           • Scan by Camera




                              嵌入式暨智慧機器人應用實驗室
                                http://eiral.csie.stut.edu.tw/




                                     Bump




                              嵌入式暨智慧機器人應用實驗室
                                http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                 15
GPS Speedometer vs.Trapster




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                  唐詩三百首 vs. ColorDict




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               16
Cardio Trainer vs. Pedometer




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                        Google Sky map




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               17
fring vs. Skype Lite




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                       Sensor Insider Lite




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               18
Game




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                                Agenda
           • SmartPhones
              – Symbian, Android, iPhone, Mobile, BlackBerry
              – Comparison with Apps Store (Market)
              – Comparison with Development Environment
           • Which is the winner?
           • Android History and Applications
           • Android Programming-Application and
             Framework
           • References
                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               19
Android Programming
           •   Java
           •   Process Types
           •   Activity life cycle
           •   Framework
           •   Project Directory
           •   Permission
           •   UI

                              嵌入式暨智慧機器人應用實驗室
                                http://eiral.csie.stut.edu.tw/




               The Process Types of the Android
           • Foreground process
             (Active Process)
           • Visible process
           • Service process
           • Background process
           • Empty process


                              嵌入式暨智慧機器人應用實驗室
                                http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                 20
Activity life cycle




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                      Android Framework




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               21
Standard Intents
           •   Web browser
           •   Phone Call
           •   Send Voice mail
           •   Active Google map and show map
           •   Active Street View




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




               Application Framework and Event
                          driven flow




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               22
Example (Adder)




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                        Project Directory




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               23
Sources (src)




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                         Resources (res)




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               24
Resources (res/drawable)




                                  嵌入式暨智慧機器人應用實驗室
                                    http://eiral.csie.stut.edu.tw/




                       Layout (FrameLayout)
           • The simplest
             type of layout
             object

           • Blank space/
             fill with a single
             object

           • Subsequent
             child views will
             simply be
             drawn over
             previous ones

                                  嵌入式暨智慧機器人應用實驗室
                                    http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                     25
LinearLayout



           WRAP_CONTENT                                        FILL_PARENT




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                  LinearLayout (orientation)




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                             26
RelativeLayout (layout_marginLeft)


                    150


                          160
                                   240




                                嵌入式暨智慧機器人應用實驗室
                                  http://eiral.csie.stut.edu.tw/




                    Resources (res/layout)




                                嵌入式暨智慧機器人應用實驗室
                                  http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                   27
Resources (res/values)




                                     嵌入式暨智慧機器人應用實驗室
                                       http://eiral.csie.stut.edu.tw/




               How to get the Resources-XML



            /res/values/string.xml




                                     嵌入式暨智慧機器人應用實驗室
                                       http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                        28
How to get the Resources-Java




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                     AndroidManifest.xml




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               29
Create Virtual Device (AVD)




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                    The UI of the Android




                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                               30
Permission                         •  LOCATION:
                                                               ACCESS_COARSE_LOCATION
                                                               ACCESS_FINE_LOCATION
                                                               •  PHONE:
                                                               CALL_PHONE
                                                               MODIFY_PHONE_STATE
                                                               READ_PHONE_STATE
                                                               VIBRATE
                                                               WIFI:
                                                               ACCESS_WIFI_STATE
                                                               •  SMS:
                                                               READ_SMS
                                                               BROADCAST_SMS
                                                               RECEIVE_SMS
                                                               SEND_SMS
                                                               WRITE_SMS
                                                               •  CAMERA:
                                                               CAMERA
                                                               •  INTERNET:
                                                               INTERNET
                                                               •  ORIENTATION:
                                                               SET_ORIENTATION
                                                               •  WALLPAPER:
                                                               SET_WALLPAPER
                                                                        …….
                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




                                Agenda
           • SmartPhones
              – Symbian, Android, iPhone, Mobile, BlackBerry
              – Comparison with Apps Store (Market)
              – Comparison with Development Environment
           • Which is the winner?
           • Android History and Applications
           • Android Programming-Application and
             Framework
           • References
                            嵌入式暨智慧機器人應用實驗室
                              http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                                        31
References
           1. 高煥堂,”Google Android 應用框架原理與程式設計”,2008
           2.余志隆等,”Google Android SDK 開發範例大全”,悅知文化
           3. 楊文誌,”Google Android程式設計與應用”,旗標
           4.蓋所林,”Google Android手機應用程式設計入門”,文魁
           5. Reto Meier,”Professional Android Application Development”,wrox
           6. J.F. DiMarzio,”Android –A Programmer’s Guide”,Mc Graw Hill.
           7. Chris Haseman, “Android Essentials”, apress
           8. 韓超,梁泉,”Android 系統原理及開發要點詳解”,電子工業出版社
           9. http://penguin7.blog.51cto.com/966026/222075
           10. Android SDK, http://developer.android.com/intl/zh-TW/sdk/index.html
           11. http://zh.wikipedia.org/zh/Android



                                    嵌入式暨智慧機器人應用實驗室
                                      http://eiral.csie.stut.edu.tw/




                                            Q&A

                    Contact : wucc@mail.stut.edu.tw
                    Homepage: http://eiral.csie.stut.edu.tw
                    TEL:+886-6-2533131 ext 3235




                                    嵌入式暨智慧機器人應用實驗室
                                      http://eiral.csie.stut.edu.tw/




嵌入式暨智慧機器人應用實驗室
  http://eiral.csie.stut.edu.tw/                                                     32

Más contenido relacionado

Similar a Android programming and application

行動與雲端科技在圖書館的應用
行動與雲端科技在圖書館的應用行動與雲端科技在圖書館的應用
行動與雲端科技在圖書館的應用皓仁 柯
 
iPhone/iPad APP Development Class 101
iPhone/iPad APP Development Class 101iPhone/iPad APP Development Class 101
iPhone/iPad APP Development Class 101Ryan Chung
 
智慧連網產品服務設計的挑戰與機會
智慧連網產品服務設計的挑戰與機會智慧連網產品服務設計的挑戰與機會
智慧連網產品服務設計的挑戰與機會William Shyu
 
開放原始碼 Ch3.1 mobile - oss - oss行動領域-1 (ver1.0)
開放原始碼 Ch3.1  mobile - oss - oss行動領域-1 (ver1.0) 開放原始碼 Ch3.1  mobile - oss - oss行動領域-1 (ver1.0)
開放原始碼 Ch3.1 mobile - oss - oss行動領域-1 (ver1.0) My own sweet home!
 
[ICOS2013] Appcelerator Titanium簡介
[ICOS2013] Appcelerator Titanium簡介[ICOS2013] Appcelerator Titanium簡介
[ICOS2013] Appcelerator Titanium簡介Justin Lee
 
Appium手机自动化测试 testerhome_bqcon版本
Appium手机自动化测试 testerhome_bqcon版本Appium手机自动化测试 testerhome_bqcon版本
Appium手机自动化测试 testerhome_bqcon版本延胜 黄
 
Android简介
Android简介Android简介
Android简介wzwdwx
 
Toutiao 2013 Jan Series B Funding Deck
Toutiao 2013 Jan Series B Funding DeckToutiao 2013 Jan Series B Funding Deck
Toutiao 2013 Jan Series B Funding DeckMatthew Brennan
 
開放原始碼 Ch2.3 app - oss - ui framewoks (ver 1.0)
開放原始碼 Ch2.3   app - oss - ui framewoks (ver 1.0)開放原始碼 Ch2.3   app - oss - ui framewoks (ver 1.0)
開放原始碼 Ch2.3 app - oss - ui framewoks (ver 1.0)My own sweet home!
 
一步一步开发Html5 mobile apps
一步一步开发Html5 mobile apps一步一步开发Html5 mobile apps
一步一步开发Html5 mobile appsAdam Lu
 
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego daycsdnmobile
 
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego daycsdnmobile
 
雲端生活面面觀
雲端生活面面觀雲端生活面面觀
雲端生活面面觀Vista Cheng
 
App 如何跨越虛擬與現實的鴻溝
App 如何跨越虛擬與現實的鴻溝App 如何跨越虛擬與現實的鴻溝
App 如何跨越虛擬與現實的鴻溝Mikimoto Chuang
 
Appium手机自动化测试 tester home公开课
Appium手机自动化测试 tester home公开课Appium手机自动化测试 tester home公开课
Appium手机自动化测试 tester home公开课lihuazhang
 
指尖之美 如何打造优秀的移动应用
指尖之美 如何打造优秀的移动应用指尖之美 如何打造优秀的移动应用
指尖之美 如何打造优秀的移动应用isnofate
 
啟動你的AI工匠魂
啟動你的AI工匠魂啟動你的AI工匠魂
啟動你的AI工匠魂Erhwen Kuo
 
開放原始碼 Ch1.3 intro - oss - google codes (ver 2.0)
開放原始碼 Ch1.3   intro - oss - google codes (ver 2.0)開放原始碼 Ch1.3   intro - oss - google codes (ver 2.0)
開放原始碼 Ch1.3 intro - oss - google codes (ver 2.0)My own sweet home!
 
160126 T客邦創客 night 分享
160126 T客邦創客 night 分享160126 T客邦創客 night 分享
160126 T客邦創客 night 分享CAVEDU Education
 

Similar a Android programming and application (20)

行動與雲端科技在圖書館的應用
行動與雲端科技在圖書館的應用行動與雲端科技在圖書館的應用
行動與雲端科技在圖書館的應用
 
行動技術開發概論
行動技術開發概論行動技術開發概論
行動技術開發概論
 
iPhone/iPad APP Development Class 101
iPhone/iPad APP Development Class 101iPhone/iPad APP Development Class 101
iPhone/iPad APP Development Class 101
 
智慧連網產品服務設計的挑戰與機會
智慧連網產品服務設計的挑戰與機會智慧連網產品服務設計的挑戰與機會
智慧連網產品服務設計的挑戰與機會
 
開放原始碼 Ch3.1 mobile - oss - oss行動領域-1 (ver1.0)
開放原始碼 Ch3.1  mobile - oss - oss行動領域-1 (ver1.0) 開放原始碼 Ch3.1  mobile - oss - oss行動領域-1 (ver1.0)
開放原始碼 Ch3.1 mobile - oss - oss行動領域-1 (ver1.0)
 
[ICOS2013] Appcelerator Titanium簡介
[ICOS2013] Appcelerator Titanium簡介[ICOS2013] Appcelerator Titanium簡介
[ICOS2013] Appcelerator Titanium簡介
 
Appium手机自动化测试 testerhome_bqcon版本
Appium手机自动化测试 testerhome_bqcon版本Appium手机自动化测试 testerhome_bqcon版本
Appium手机自动化测试 testerhome_bqcon版本
 
Android简介
Android简介Android简介
Android简介
 
Toutiao 2013 Jan Series B Funding Deck
Toutiao 2013 Jan Series B Funding DeckToutiao 2013 Jan Series B Funding Deck
Toutiao 2013 Jan Series B Funding Deck
 
開放原始碼 Ch2.3 app - oss - ui framewoks (ver 1.0)
開放原始碼 Ch2.3   app - oss - ui framewoks (ver 1.0)開放原始碼 Ch2.3   app - oss - ui framewoks (ver 1.0)
開放原始碼 Ch2.3 app - oss - ui framewoks (ver 1.0)
 
一步一步开发Html5 mobile apps
一步一步开发Html5 mobile apps一步一步开发Html5 mobile apps
一步一步开发Html5 mobile apps
 
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day
 
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day
上午2 intel 杜伟_iadp app_up intro - isn isc chn for idf meego day
 
雲端生活面面觀
雲端生活面面觀雲端生活面面觀
雲端生活面面觀
 
App 如何跨越虛擬與現實的鴻溝
App 如何跨越虛擬與現實的鴻溝App 如何跨越虛擬與現實的鴻溝
App 如何跨越虛擬與現實的鴻溝
 
Appium手机自动化测试 tester home公开课
Appium手机自动化测试 tester home公开课Appium手机自动化测试 tester home公开课
Appium手机自动化测试 tester home公开课
 
指尖之美 如何打造优秀的移动应用
指尖之美 如何打造优秀的移动应用指尖之美 如何打造优秀的移动应用
指尖之美 如何打造优秀的移动应用
 
啟動你的AI工匠魂
啟動你的AI工匠魂啟動你的AI工匠魂
啟動你的AI工匠魂
 
開放原始碼 Ch1.3 intro - oss - google codes (ver 2.0)
開放原始碼 Ch1.3   intro - oss - google codes (ver 2.0)開放原始碼 Ch1.3   intro - oss - google codes (ver 2.0)
開放原始碼 Ch1.3 intro - oss - google codes (ver 2.0)
 
160126 T客邦創客 night 分享
160126 T客邦創客 night 分享160126 T客邦創客 night 分享
160126 T客邦創客 night 分享
 

Android programming and application

  • 1. Android Programming & Application Chien-Chung Wu (吳建中), Ph. D. Associate Professor Dept. Computer Science and Information Engineering Southern Taiwan University of Technology 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Agenda • SmartPhones – Symbian, Android, iPhone, Mobile, BlackBerry – Comparison with Apps Store (Market) – Comparison with Development Environment • Which is the winner? • Android History and Applications • Android Programming-Application and Framework • References 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 1
  • 2. Agenda • SmartPhones – Symbian, Android, iPhone, Mobile, BlackBerry – Comparison with Apps Store (Market) – Comparison with Development Environment • Which is the winner? • Android History and Applications • Android Programming-Application and Framework • References 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Smartphone rank by Different OS 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 2
  • 3. Smart Phone Sales By OS 資料來源:http://gigaom.com/2010/03/18/the-mobile-os-market/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ The Smart Phone OS Market 資料來源:http://gigaom.com/2010/03/18/the-mobile-os-market/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 3
  • 4. Agenda • SmartPhones – Symbian, Android, iPhone, Mobile, BlackBerry – Comparison with Apps Store (Market) – Comparison with Development Environment • Which is the winner? • Android History and Applications • Android Programming-Application and Framework • References 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Apps store (market) • RIM BlackBerry app world • Microsoft Mobile Market Place • Nokia Ovi Store • Google Android market • Apple iPhone app store 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 4
  • 5. RIM BlackBerry App World 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Nokia Ovi Store 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 5
  • 6. Google Android Market 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Apple iPhone App Store 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 6
  • 7. Microsoft Mobile Marketplace 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ OS vs. Apps 資料來源:http://www.sogi.com.tw/newforum/article_list.aspx?topic_id=6108341 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 7
  • 8. Agenda • SmartPhones – Symbian, Android, iPhone, Mobile, BlackBerry – Comparison with Apps Store (Market) – Comparison with Development Environment • Which is the winner? • Android History and Applications • Android Programming-Application and Framework • References 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Development Environment Tools • Nokia Symbian • Apple iPhone • Microsoft Mobile • Google Android 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 8
  • 9. Development Environment Tools (Symbian) • Active Perl Script • Java • Carbide.c++ • 3rd Edition Maintenance Release版本的S60 SDK • Extensions plug-in for S60 5th Edition SDK for Symbian OS, for C++, MR的擴展插件 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Development Environment Tools (iPhone) • Mac OS • iPhone Dev Center • Need Apple ID 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 9
  • 10. Development Environment Tools (Mobile) • .Net 2003/2005/2008 • Platform builder (for 4.2 and 5.0 only) • .NET Compact Framework 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Development Environment Tools (Android) • JDK5 or JDK6 version • Eclipse IDE (3.3 or higher) • Android Development Tools plugin 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 10
  • 11. Agenda • SmartPhones – Symbian, Android, iPhone, Mobile, BlackBerry – Comparison with Apps Store (Market) – Comparison with Development Environment • Which is the winner? • Android History and Applications • Android Programming-Application and Framework • References 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Which is the winner? • Royalty? • Price? • Open Source? • Apps quantities? • Functions? 資料來源:http://www.sogi.com.tw/newforum/article_list.aspx?topic_id=6108341 • UI? 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 11
  • 12. Agenda • SmartPhones – Symbian, Android, iPhone, Mobile, BlackBerry – Comparison with Apps Store (Market) – Comparison with Development Environment • Which is the winner? • Android History and Applications • Android Programming-Application and Framework • References 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Android 1.5 (Cupcake) • 2009年4月30日,官方1.5版本(Cupcake) • Linux Kernel 2.6.27 • 拍攝/回放視訊,並支援上傳到youtube • 支援立體聲藍牙耳機,同時改善自動配對性能 • 最新的採用WebKit技術的瀏覽器,支援拷貝/粘帖 和頁面中搜尋 • GPS性能大大提高 • 螢幕虛擬鍵盤 • 主螢幕增加音樂播放器和相框widgets • 應用程式自動隨著手機旋轉 HTC Dream • 簡訊,Gmail,日歷,瀏覽器的用戶介面大幅改 善,比如說Gmail現在可以批量刪除郵件了 HTC Magic • 相機啟動速度加快,拍攝圖片可以直接上傳到 HTC Hero picasa • 來電照片顯示 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 12
  • 13. Android 1.6 (Donut) • 2009年9月15日, 1.6(Donut)版本SDK 發佈。 • Linux Kernel 2.6.29 • 完全重新設計的Android Market • 手勢支援 • 支援CDMA網路 • 文字轉語音系統(TXT-2-speech) • 快速搜尋框 • 全新的拍照介面 • 應用程式耗電檢視 • 支援VPN • 支援更多的螢幕解析度 Acer Liquid • 支援OpenCore2媒體引擎 • 新增面向視覺或聽覺困難人群的易用 性外掛程式 HTC Tattoo 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Android 2.0/2.01/2.1 (Eclair) • 2009年10月26日, 2.0(Eclair)版本SDK發 佈。 • Linux Kernel 2.6.29 • 優化硬體速度 • "Car Home“---voice-controlled car accessibility • 支援更多的螢幕解析度 • 重整介面 • 新的瀏覽器的用戶介面和支援HTML5 HTC Legend • 新的聯繫人名單 (2.1) • 更好的白色/黑色背景比率 • 改進Google Maps 3.1.2 MOTO MILESTONE • 支援Microsoft Exchange (2.0) • 支援內置相機閃光燈 • 數位變焦 • 改進的虛擬鍵盤 • 藍牙2.1 嵌入式暨智慧機器人應用實驗室 Samsung I8250 http://eiral.csie.stut.edu.tw/ (2.1) 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 13
  • 14. Android 2.2 (Froyo) • 2010年5月20日 Android 2.2(Froyo)版 本SDK發佈。 • Linux Kernel 2.6.32 • 支援安裝軟體來擴展內存 • 手機與筆記型電腦共享網絡連接 • 整合Adobe Flash 10.1支援 • 加強軟體即時編譯的速度 • 新增軟體啟動"快速"至電話和瀏覽器 • USB分享器和WiFi熱點功能 • 支援在瀏覽器上傳檔案 • 更新Market中的"batch"和自動更新 • 增加對Microsoft Exchange的支援 (安 全政策, auto-discovery, GAL look-up) • 整合Chrome的V8 JavaScript引擎應用 到瀏覽器 • 加強快速搜尋小工具 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Android Apps • Download by Androids Market • Download by AndAppStore • Download by QR Code • Download by S市集 • … 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 14
  • 15. Barcode Scanner • Scan by Camera 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Bump 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 15
  • 16. GPS Speedometer vs.Trapster 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 唐詩三百首 vs. ColorDict 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 16
  • 17. Cardio Trainer vs. Pedometer 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Google Sky map 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 17
  • 18. fring vs. Skype Lite 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Sensor Insider Lite 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 18
  • 19. Game 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Agenda • SmartPhones – Symbian, Android, iPhone, Mobile, BlackBerry – Comparison with Apps Store (Market) – Comparison with Development Environment • Which is the winner? • Android History and Applications • Android Programming-Application and Framework • References 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 19
  • 20. Android Programming • Java • Process Types • Activity life cycle • Framework • Project Directory • Permission • UI 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ The Process Types of the Android • Foreground process (Active Process) • Visible process • Service process • Background process • Empty process 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 20
  • 21. Activity life cycle 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Android Framework 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 21
  • 22. Standard Intents • Web browser • Phone Call • Send Voice mail • Active Google map and show map • Active Street View 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Application Framework and Event driven flow 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 22
  • 23. Example (Adder) 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Project Directory 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 23
  • 24. Sources (src) 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Resources (res) 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 24
  • 25. Resources (res/drawable) 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Layout (FrameLayout) • The simplest type of layout object • Blank space/ fill with a single object • Subsequent child views will simply be drawn over previous ones 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 25
  • 26. LinearLayout WRAP_CONTENT FILL_PARENT 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ LinearLayout (orientation) 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 26
  • 27. RelativeLayout (layout_marginLeft) 150 160 240 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Resources (res/layout) 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 27
  • 28. Resources (res/values) 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ How to get the Resources-XML /res/values/string.xml 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 28
  • 29. How to get the Resources-Java 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ AndroidManifest.xml 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 29
  • 30. Create Virtual Device (AVD) 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ The UI of the Android 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 30
  • 31. Permission • LOCATION: ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION • PHONE: CALL_PHONE MODIFY_PHONE_STATE READ_PHONE_STATE VIBRATE WIFI: ACCESS_WIFI_STATE • SMS: READ_SMS BROADCAST_SMS RECEIVE_SMS SEND_SMS WRITE_SMS • CAMERA: CAMERA • INTERNET: INTERNET • ORIENTATION: SET_ORIENTATION • WALLPAPER: SET_WALLPAPER ……. 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Agenda • SmartPhones – Symbian, Android, iPhone, Mobile, BlackBerry – Comparison with Apps Store (Market) – Comparison with Development Environment • Which is the winner? • Android History and Applications • Android Programming-Application and Framework • References 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 31
  • 32. References 1. 高煥堂,”Google Android 應用框架原理與程式設計”,2008 2.余志隆等,”Google Android SDK 開發範例大全”,悅知文化 3. 楊文誌,”Google Android程式設計與應用”,旗標 4.蓋所林,”Google Android手機應用程式設計入門”,文魁 5. Reto Meier,”Professional Android Application Development”,wrox 6. J.F. DiMarzio,”Android –A Programmer’s Guide”,Mc Graw Hill. 7. Chris Haseman, “Android Essentials”, apress 8. 韓超,梁泉,”Android 系統原理及開發要點詳解”,電子工業出版社 9. http://penguin7.blog.51cto.com/966026/222075 10. Android SDK, http://developer.android.com/intl/zh-TW/sdk/index.html 11. http://zh.wikipedia.org/zh/Android 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ Q&A Contact : wucc@mail.stut.edu.tw Homepage: http://eiral.csie.stut.edu.tw TEL:+886-6-2533131 ext 3235 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 32