Sunday, October 6, 2013

android.app

Contains high-level classes encapsulating the overall Android application model.
An Android application is defined using one or more of Android's four core application components. Two such application components are defined in this package: Activity and Service. The other two components are from theandroid.content package: BroadcastReceiver and ContentProvider.
An Activity is an application component that provides a screen with which users can interact in order to do something, such as dial the phone, take a photo, send an email, or view a map. An activity can start other activities, including activities that live in separate applications.
Service is an application component that can perform long-running operations in the background without a user interface. For example, a service can handle network transactions, play music, or work with a content provider without the user being aware of the work going on.
The Fragment class is also an important part of an application's design—especially when designing for large screen devices, such as tablets. A fragment defines a distinct part of an activity's behavior, including the associated UI. It has its own lifecycle that is similar to that of the activity and can exist alongside other fragments that are embedded in the activity. While an activity is running, you can add and remove fragments and include each fragment in a back stack that's managed by the activity—allowing the user to navigate backwards through the fragment states, without leaving the activity.
This package also defines application utilities, such as dialogs, notifications, and the action bar.
For information about using some the classes in this package, see the following documents: ActivitiesServices,FragmentsUsing the Action BarCreating Dialogs, and Notifying the User.

No comments:

Post a Comment