Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Do you really want to delete this prezi?
Neither you, nor the coeditors you shared it with will be able to recover it again.
Make your likes visible on Facebook?
Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.
Introduction to the Android Platform
Transcript of Introduction to the Android Platform
the Android Platform Java code Market Operators Users C/C++ code App App Developers Device Makers SDK NDK Native Development Kit Allows developers to mix C/C++ code in their apps
Uses JNI (Java Native Interface) Android app is packaged into an .apk
Dalvik executable binaries
Other resources, e.g. images, data files Android developers write their apps in Java language.
Android developers can benefit from the rich tools support in the Java community, e.g. refactoring features in Eclipse.
However, Android is not Java SE nor Java ME. Android SDK comprises
Android Platform libraries w/ system images
Dalvik Executable Compiler (dx)
AIDL compiler (aidl)
Android Asset Packaging Tool (aapt)
Android Debug Bridge (adb)
ADT is a Eclipse plugin that helps using the SDK Application Framework Linux kernel Makers port Android platform to their devices
The platform is open source: source.android.com.
It is mostly written in C/C++ with small Java glue codes. Dalvik VM Native Services, Libraries Android uses a Modified version of Linux 2.6 kernel
Out Of Memory Killer
Wake Locks for Power Management
RAM Console and Log Device
Android Debug Bridge
... Sun Java SE
= Java language + JVM + Java Class libraries
= Java language + Dalvik + Apache Harmony Virtual registers instead of stack
JVM = Stack machine
Dalivk = Register-based arch. Optimized for
No swap space
Fast Spawning JIT since Android 2.2 Smaller code size
Multiple .class into single .dex to share strings and constants Alternate instruction set to Java Each app runs in a separate dalvik process Bionic
... Service Manager
... No AWT, Swing, nor Java ME Class Library (MIDP, CLDC, ...) Binder IPC IPC is crucial since Android apps & services run in separated processes. App Fundamentals Android Apps are built with four components: Activity Service Broadcast Receiver Components are declared in AndroidManifest.xml
as well as their capabilities and app requirements Content Provider Activity corresponds to a single screen in the UI. Intent Filters declare which Intents are handled by an Activity. Different apps can start each others' activities. It starts when some matching Intent was passed to startActivity(). Service runs long operations in the background. e.g. play music in the background,
or download data over the network It starts when some matching Intent was passed to startService(). Different apps can start each others' services. Content Provider abstracts the way of reading/writing app's data. Broadcast Receiver is used for handling system-wide announcements,
e.g. battery is low, screen turned off, incoming message, ... It can be queried by invoking a targeted query() on a ContentResolver. Intents are broadcasted by sendBroadcast(), sendOrderedBroadcast(), or sendStickyBroadcast(). Many broadcasts originate from the system, but apps can also initiate them. Apps can access other apps' data through Content Providers. Native Binder Java Binder /dev/binder Passing Intent objects between apps, calling native system services, ... all rely on Binder IPC. AIDL is used for generating IPC stub and proxy in Java,
but C++ codes are all hand-crafted. Data are sent through "Parcel"s in "transaction"s with Kernel support. Mostly written in C/C++ Mostly Java + JNI glue code asdf