One way to quickly learn about the Android platform is to view the Java package structure. Because Android originated from the standard JDK release, it is very important to understand supported content and unsupported content. The following describes important Android SDK packages.
Android. app: implements the Android Application Model. Main classes include application (indicating start and end words), as well as a number of activity-related classes, controls, dialog boxes, reminders, and notifications.
Android. Bluetooth: provides some classes to process Bluetooth functions. The main classes include javasthadapter, javasthdevice, javasthsocket, javasthserversocket, and javasthclass. You can use the thadapter to control the Bluetooth adapter installed locally. For example, you can enable it, disable it, and start the discovery process. Descrithdevice indicates the connected remote Bluetooth device. Two Bluetooth sockets are used to establish communication between devices. Define thclass indicates the type of the connected bluetooth device.
Android. Content: implements the contentprovider concept. Contentprovider abstracts data access from data storage. This package also implements some core concepts around intent and Android uri (uniform resource identifiers, unified resource identifiers.
Android. content. PM: Class Related to package manager. The package manager knows various permissions, installed packages, installed providers, installed services, installed components (such as activity), and installed applications.
Android. content. Res: used to access structured and unstructured resource files. The main classes include assetmanager (used for structured resources) and resources.
Android. Database: implements the concept of abstract databases. The main interface is the cursor interface.
Android. database. SQLite: implements the concept in the Android. database package. This package uses SQLite as a physical database. Main classes include sqlitecursor, sqlitedatabase, sqlitequery, sqlitequerybuilder, and sqlitestatement. However, most interactive operations will be performed with classes in the abstract Android. database package.
Android. gesture: This package contains all the classes and interfaces required to process user-defined gestures. Main classes include gesture, gesturelibrary, gestureoverlayview, gesturestore, gesturestroke, and gesturepoint. Gesture is a collection of gesturestrokes and gesturepoints. Gestures are collected in gesturelibrary. The gesture library is stored in gesturestore. All gestures have names, so that they can be marked as actions.
Android. Graphics: Contains bitmap, canvas, camera, color, matrix, movie, paint, path, Rasterizer, shader, sweepgradient, and typeface.
Android. Graphics. drawable: implements the rendering protocol and background image, and supports object animation.
Android. Graphics. drawable. shapes: implements various shapes, including arcshape, ovalshape, pathshape, rectshape, and roundrectshape.
Android. Hardware: Implements classes related to physical cameras. A camera is a camera hardware, while Android. Graphics. Camera represents a graphical concept that is completely independent of a physical camera.
Android. Location: Contains Class address, geocoder, location, locationmanager, and locationprovider. The address class represents the simplified xal (Extensible address language ). Geocoder can be used to obtain the latitude/longitude coordinates of a given address or the addresses at the given latitude/longitude coordinates. Location indicates the latitude/longitude.
Android. Media: Contains mediaplayer, mediarecorder, ringtone, audiomanager, and facedetector. Mediaplayer supports streaming media for playing audio and video. Mediarecorder is used to record audio and video. The ringtone class is used to play short audio clips that can be used as ringtones and prompts. Audiomanager controls the volume. You can use facedetector to detect faces in the in-place graph.
Android.net: implements basic socket-level network APIs. The main classes include Uri, connectivitymanager, localsocket, and localserversocket. Note that android provides HTTPS support at the browser and network levels. Android also supports using JavaScript in its browser.
Android.net. WiFi: Manage Wi-Fi connections. The main classes include wifimanager and wificonfiguration. Wifimanager is responsible for listing the configured network and currently active WiFi network.
Android. OpenGL: contains a utility class for operations on OpenGL ES. The main OpenGL ES class is implemented in a set of different packages from JSR 239. These packages are javax. microedition. khronos. opengles, javax. microedition. khronos. EGL, and javax. microedition. khronos. NiO. These packages are based on the khronos Implementation of OpenGL ES and are written in C and C ++.
Android. OS: indicates the operating system services that can be accessed through the Java programming language. Some important classes include batterymanager, binder, fileobserver, handler, logoff, and powermanager. The binder class supports inter-process communication. Fileobserver monitors file changes. The handler class is used to run tasks related to message threads, and logoff is used to run message threads.
Android. Preference: enables applications to allow users to manage their preferences for the application in a unified manner. The main classes include preferenceactivity, preferencescreen, and various classes derived from preferences, such as checkboxpreference and sharedpreferences.
Android. provider: contains a set of pre-built cntentproviders attached to the Android. content. contentprovider interface. Contentprovider includes contacts, mediastore, browser, and settings. This group of interfaces and classes store the metadata of the underlying data structure.
Android. Sax: contains a set of efficient SAX (Simple API for XML, simple xml api) parsing Utility Classes. Main classes include element, rootelement, and many elementlistener interfaces.
Android. Speech: contains constants used for speech recognition. This package is only available in version 1.5 and later.
Android. Speech. tts: supports text-to-speech conversion. The main class is texttospeech. After obtaining the text, you can request an instance of this class to queue the text to be converted to speech. You can use a large number of callbacks to monitor when the voice ends. Android uses the pico TTS (Text to Speech, Text to Speech conversion) engine from svox.
Android. Telephony: Contains celllocation, phonenumberutils, and telephonymanager classes. Telep-honymanager can be used to determine the mobile phone location, phone number, network operator name, network type, phone type, and SIM (subscriber identity module, user Identity Module) serial number.
Android. telephony. GSM: it can be used to collect mobile phone locations based on base stations. It also contains classes responsible for handling SMS messages. This package is named GSM because the global mobile communication system was the technology that initially defined the SMS data message standard.
Android. telephony. CDMA: provides support for CDMA phones.
Android. Text: contains the text processing class.
Android. Text. Method: provides a class for inputting text for various controls.
Android. Text. Style: provides multiple style settings for various texts.
Android. utils: including log, debugutils, timeutils, and XML.
Android. View: contains the Class Menu, view, viewgroup, and a series of listeners and callbacks.
Android. View. Animation: provides support for animation population. Main classes include animation, a series of animation interpolation devices, and a set of specific animation rendering classes, including alphaanimation, scaleanimation, translationanimation, and rotationanimation.
Android. View. inputmethod: framework architecture of the input method. This package is only available in version 1.5 and later.
Android. WebKit: contains a web browser class. Main classes include webview, cachemanager, and cookiemanager.
Android. Widget: contains all UI controls that are generally derived from the View class. Main Components include button, checkbox, chronometer, analogclock, datepicker, digitalclock, edittext, listview, keys, gridview, imagebutton, mediacontroller, progressbar, worker, radiogroup, ratingbutton, scroler, scrollview, spinner, tabwidget, textview, timepicker, videoview, and zoombutton.
Com. Google. Android. Maps: Contains mapview, mapcontroller, and mapactivity classes, which are essentially required to process Google Maps.
The above are some important Android packages. From this list, we can see the depth of the android core platform.
In general, the android Java API contains more than 40 packages and more than 700 classes.
In addition, Android provides many packages in the Java. * namespace. They include AWT. font, Io, Lang, Lang. annotation, Lang. ref, Lang. reflect, math, net, NiO, NiO. channels, NiO. channels. SPI, NiO. charset, security, security. ACL, security. CERT, security. interfaces, security. SPEC, SQL, text, util, util. concurrent, util. concurrent. atomic, util. concurrent. locks, util. jar, util. logging, util. prefs, util. regEx and util.zip. Android also contains the following packages in the javax namespace: crypto and crypto. SPEC, microedition. khronos. EGL, microedition. khronos. opengles, net, and net. SSL, security. auth, security. auth. callback, security. auth. login, security. auth. x500, security. CERT, SQL, XML, and xmlparsers. In addition, it also contains. apache. HTTP. * many packages and org. JSON, org. w3C. dom, org. XML. sax, org. XML. sax. EXT, org. XML. sax. helpers, org. xmlpull. v1 and org. xmlpull. v1.sax2. All in all, countless packages provide a function-rich computing platform for writing applications for handheld devices.