App Development for Android.ppt
《App Development for Android.ppt》由会员分享,可在线阅读,更多相关《App Development for Android.ppt(55页珍藏版)》请在麦多课文档分享上搜索。
1、App Development for Android,Prabhaker Mateti,CEG 436 Specifics,Because CEG 436 is a 10-week term course skipped for now refreshers on Operating Systems TCP/IP Networking Cellular Telephony “Definitions” Mobile Devices/Smart Phone What is Android?,2,CEG436,Development Tools,(Android) Java Java syntax
2、 is the same. But, not all libs are included. Unused: Swing, AWT, SWT, lcdui Eclipse www.eclipse.org/ ADT Plugin for Eclipse Android SDK Android Device Emulator Development Platforms: Linux, Mac OSX, or Windows,3,CEG436,The Emulator,QEMU-based ARM emulator Displays the same image as the device Lim
3、itations: No Camera support,CEG436,4,Debugging,adb acts as a middleman between a device and your development system. It provides various device management capabilities, including moving and syncing files to the emulator, running a UNIX shell on the device or emulator, and providing a general means t
4、o communicate with connected emulators and devices. Dalvik Debug Monitor Server DDMS is a graphical program that communicates with your devices through adb. DDMS can capture screenshots, gather thread and stack information, spoof incoming calls and SMS messages, and has many other features. Device o
5、r Android Virtual Device An adb device daemon runs on the device or emulator and provides a means for the adb host daemon to communicate with the device or emulator. JDWP debugger The Dalvik VM supports the JDWP protocol to allow debuggers to attach to a VM. Java IDEs include a JDWP debugger, or you
6、 can use a command line debugger such as jdb.,5,CEG436,Android Application Package,res/layout: declaration layout filesres/drawable: intended for drawingres/anim: bitmaps, animations for transitionsres/values: externalized values strings, colors, styles, etcres/xml: general XML files used at runtime
7、res/raw: binary files (e.g., sound),An application consists of:,Java Code,Data Files,Resources Files,CEG436,6,Android Application Package,Using Java/Eclipse/ADT develop several source code files. An Android application is bundled by the “aapt” tool into an Android package (.apk) An .apk file is a zi
8、p file. Invoke unzip if you wish. “Installing” an Application is a built-in op of Android OS. May need to enable the trustworthiness of developer,CEG436,7,A Launcher: zeam-2.9.0.apk,( a highly incomplete list ) res/anim/apps_fade_in.xml res/color/bright_text_dark_focused.xml res/drawable/box_launche
9、r_top.xml res/drawable/timepicker_up_selected.9.png res/layout/application_list.xml res/xml/preferences.xml AndroidManifest.xml resources.arsc res/drawable-hdpi/action_notifications.png res/layout-land/application.xml classes.dex META-INF/MANIFEST.MF META-INF/CERT.SF META-INF/CERT.RSA,8,CEG436,Andro
10、id Architecture,Android Architecture,10,CEG436,Linux Kernel,Works as a Hardware Abstraction Layer (HAL) Device drivers Keypad, Display, Power Mgmt, FlashMem, Binder, WiFi, Audio, Camera Memory management Process management Networking,11,CEG436,Linux Kernel Enhancements,Alarm Ashmem (Anonymous SHared
11、 MEMory) ashmem uses virtual memory, whereas pmem (process memory allocator) uses physically contiguous memory Binder an Android-specific inter-process communication mechanism, and remote method invocation system. Power Management Low Memory Killer echo “1536,2048,4096,15120,15360,23040“ /sys/module
12、/lowmemorykiller/parameters/minfree Kernel Debugger Logger (system logging facility),CEG436,12,Android Runtime,Dalvik VM a newly developed Java Virtual Machine dx tool translates .class files to .dex files Compact compared to .class files Optimized for memory and battery power Core Libraries Java St
13、d Edition Collections, I/O etc,13,CEG436,Libraries,Surface Manager: A compositing window manager similar to Compiz. Instead of drawing directly to the screen buffer, drawing commands go into off-screen bitmaps that are then combined with other bitmaps to form the display the user sees. Can create se
14、e-through windows, fancy transitions, 2D and 3D graphics: Use 3D hardware or a software renderer. OpenGL. Media codecs: AAC, AVC (H.264), H.263, MP3, MPEG-4, ,14,CEG436,Libraries,SQLite database engine Provides persistent storage. Also used in Firefox and the iPhone. Browser engine: WebKit library f
15、or rendering web pages the same engine is used in KDE, the Google Chrome browser, Apples Safari browser, the iPhone, and Symbian 60.,15,CEG436,Android NDK: Native C/C+ libraries,C/C+ libraries not the full glibc as in Linux distros Supported CPUs: ARM, x86 libc (C library) headers libm (math library
16、) headers JNI interface headers libz (Zlib compression) headers liblog (Android logging) header OpenGL ES headers libjnigraphics (Pixel buffer access) header A Minimal set of headers for C+ support OpenSL ES native audio libraries Android native application APISCross-toolchains (compilers, linkers,
17、.),16,CEG436,OpenGL ES,OpenGL ES is a subset of OpenGL graphics standard. low-level interface for graphics acceleration. floating-point and fixed-point systems. OpenGL ES 1.X is for fixed function hardware and offers acceleration, image quality and performance. OpenGL ES 2.X enables full programmabl
18、e 3D graphics. OpenGL SC is tuned for the safety critical market. http:/www.khronos.org/opengles/,17,CEG436,Application Framework,Views lists, grids, text boxes, buttons, and even an embeddable web browser Content Providers to access data from other applications (such as Contacts), or to share their
19、 own data A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files A Notification Manager that enables all applications to display custom alerts in the status bar An Activity Manager that manages the lifecycle of applications and provides a com
20、mon navigation backstack sic,CEG436,18,Standard Applications,Android provides a set of core applications: Email Client SMS Program Calendar Maps Browser Contacts Etc All applications are written using the Java language.,CEG436,19,Android Application Internals,Application Fundamentals,Each applicatio
21、n is a different “user”. Each application gets a unique Linux user ID. The system sets permissions for all the files in an application so that only the user ID assigned to that application can access them. Each process has its own Dalvik VM. Every application runs in its own Linux process. A process
22、 can have multiple threads.,21,CEG436,Application Components,Activity represents a single screen with a user interface. Service runs in the background; Long-running; for remote processes no user interface. Content provider manages a shared set of application data. Broadcast receiver responds to broa
23、dcast announcements. An application can have multiple instances of the above four types. Each component is a different point through which the system can enter an application. Every component has a managed lifecycle.,22,CEG436,.apk Internals,AndroidManifest.xml deployment descriptor for applications
24、. IntentReceiver as advertised by the IntentFilter tag. *.java files implement Android activity Main.xml visual elements, or resources, for use by activities. R.java automatically generated by Android Developer Tools and “connects“ the visual resources to the Java source code. Components share a Lin
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- APPDEVELOPMENTFORANDROIDPPT
