Java Reference
In-Depth Information
low-leveloperatingsystemtohigh-levelapps),andkeyapps(writteninJava)suchasa
web browser (known as Browser) and a contact manager (known as Contacts).
Android offers the following features:
• Application framework enabling reuse and replacement of app components
• Bluetooth, EDGE, 3G, and WiFi support (hardware dependent)
• Camera, GPS, compass, and accelerometer support (hardware dependent)
• Dalvik virtual machine optimized for mobile devices
• GSM Telephony support (hardware dependent)
• Integrated browser based on the open source WebKit engine
• Media support for common audio, video, and still image formats (MPEG4,
H.264, MP3, AAC, AMR, JPG, PNG, GIF)
• Optimized graphics powered by a custom 2D graphics library; 3D graphics
based on the OpenGL ES 1.0 specification (hardware acceleration optional)
• SQLite for structured data storage
Note Although not part of an Android device's software stack, Android's rich de-
velopmentenvironment(includingadeviceemulatorandapluginfortheEclipseIDE)
could also be considered an Android feature.
Android apps are written in Java and can access only the Java APIs described in
the API reference at http://developer.android.com/reference/pack-
ages.html (as well as Android-oriented third-party APIs). They cannot access Java
APIsbeyondJava5.ThisrestrictionaffectsJava7'stry-with-resourcesstatement,which
is based on the new java.lang.AutoCloseable interface and API support for
suppressed exceptions. You cannot use try-with-resources in your Android source code.
Note NotallJava5(andpreviousversion)APIsaresupportedbyAndroid.Forex-
ample,Androiddoesn'tsupporttheAbstractWindowToolkit(AWT)orSwing.Instead,
it offers a smaller set of user-interface APIs.
Android Architecture
The Android software stack consists of apps at the top, middleware (consisting of an
application framework, libraries, and the Android runtime) in the middle, and a Linux
kernel with various drivers at the bottom. Figure 12-1 shows this layered architecture.
Search WWH ::




Custom Search