Core Android packages

If you have developed in Java previously, you will recognize many familiar Java packages for core functionality. These include packages such as:

■ java.lang—Core Java language classes.

■—Input/output capabilities.

■—Network connections.

■ java.util —Utility classes. This package includes the Log class used to write to the LogCat.

■ java.text —Text-handling utilities.

■ java.math—Math and number-manipulation classes.

■—Security-related classes.

There are additional Java classes. Generally speaking, there is minimal focus in this book on core packages listed here, because our primary concern is Android development. With that in mind, let's look at the Android-specific functionality found in the Android SDK.

Android-specific packages are very easy to identify because they start with android in the package name. Some of the more important packages include:

■—Android application model access

■ android.content—Accessing and publishing data in Android

■—Contains the Uri class, used for accessing various content

■—Graphics primitives

■ android.opengl—OpenGL classes

■ android.os—System-level access to the Android environment

■ android.provider—ContentProvider-related classes

■ android.telephony—Telephony capability access

■ android.text—Text layout

■ android.util—Collection of utilities for text manipulation, including XML

■ android.view—UI elements

■ android.webkit—Browser functionality

■ android.widget—More UI elements

Some of these packages are absolutely core to Android application development, including, android.view, and android.content. Other packages are used to varying degrees depending on the type of applications being constructed.

0 0

Post a comment