32
嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 1 嵌入式暨智慧機器人應用實驗室 http://eiral.csie.stut.edu.tw/ 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

Android programming and application

Embed Size (px)

Citation preview

  • 1.Android Programming &ApplicationChien-Chung Wu (), Ph. D.Associate ProfessorDept. Computer Science and Information EngineeringSouthern 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 andFramework 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 andFramework 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 andFramework Referenceshttp://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 andFramework 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 ReleaseS60SDK Extensions plug-in for S60 5th Edition SDKfor 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 andFramework 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 andFramework References http://eiral.csie.stut.edu.tw/Android 1.5 Cupcake20094301.5CupcakeLinux Kernel 2.6.27/youtubeWebKit/ GPSwidgetsHTC DreamGmail GmailHTC Magic HTC Hero picasa http://eiral.csie.stut.edu.tw/ http://eiral.csie.stut.edu.tw/12 13. Android 1.6 (Donut) 2009915, 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) 20091026, 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)2010520 Android 2.2(Froyo) SDKLinux Kernel 2.6.32Adobe Flash 10.1""USBWiFiMarket"batch"Microsoft Exchange ( , auto-discovery, GAL look-up)ChromeV8 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 andFramework 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 simplesttype of layoutobject Blank space/fill with a singleobject Subsequentchild views willsimply bedrawn overprevious ones http://eiral.csie.stut.edu.tw/ http://eiral.csie.stut.edu.tw/ 25 26. LinearLayout WRAP_CONTENTFILL_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 160240 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.xmlhttp://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 LOCATIONACCESS_COARSE_LOCATIONACCESS_FINE_LOCATIONPHONECALL_PHONEMODIFY_PHONE_STATEREAD_PHONE_STATEVIBRATEWIFIACCESS_WIFI_STATESMSREAD_SMSBROADCAST_SMSRECEIVE_SMSSEND_SMSWRITE_SMSCAMERACAMERAINTERNETINTERNETORIENTATIONSET_ORIENTATIONWALLPAPERSET_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 andFramework References http://eiral.csie.stut.edu.tw/ http://eiral.csie.stut.edu.tw/31 32. References1. ,Google Android ,20082.,Google Android SDK ,3. ,Google Android,4.,Google Android,5. Reto Meier,Professional Android Application Development,wrox6. J.F. DiMarzio,Android A Programmers Guide,Mc Graw Hill.7. Chris Haseman, Android Essentials, apress8. ,,Android ,9. http://penguin7.blog.51cto.com/966026/22207510. Android SDK, http://developer.android.com/intl/zh-TW/sdk/index.html11. http://zh.wikipedia.org/zh/Android http://eiral.csie.stut.edu.tw/ Q&AContact : [email protected] 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