android notes(1)

1. Android is a software stack for mobile devices that includes an operating system, middleware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.

2. Application Fundamentals:
   Android applications are written in the Java programming language. The compiled Java code — along with any data and resource files required by the application — is bundled by the aapt tool into an Android package, an archive file marked by an .apk suffix. This file is the vehicle for distributing the application and installing it on mobile devices; it's the file users download to their devices. All the code in a single .apk file is considered to be one application.

3. Application Components
   Android applications don't have a single entry point for everything in the application (no main() function, for example). Rather, they have essential components that the system can instantiate and run as needed. There are four types of components:
   a. Activities
      An activity presents a visual user interface for one focused endeavor the user can undertake. Each one is implemented as a subclass of the Activity base class.
  
   b. Services
      A service doesn't have a visual user interface, but rather runs in the background for an indefinite period of time.Each service extends the Service base class.

   c. Broadcast receivers
      A broadcast receiver is a component that does nothing but receive and react to broadcast announcements.

   d. Content providers
      A content provider makes a specific set of the application's data available to other applications. The data can be stored in the file system, in an SQLite database, or in any other manner that makes sense. The content provider extends the ContentProvider base class

4. Activating components: intents
   Content providers are activated when they're targeted by a request from a ContentResolver. The other three components — activities, services, and broadcast receivers — are activated by asynchronous messages called intents. An intent is an Intent object that holds the content of the message.

你可能感兴趣的:(android,sqlite,mobile)