Ray's playground

 

Key Concepts(Chapter 2 of Hello, Android)

  Android is built on top of a solid and proven foundation: the Linux kernel.Internally, Android uses Linux for its memory management, process management, networking, and other operating system services. The Android phone user will never see Linux and your programs will not make Linux calls directly.

  The next layer above the kernel contains the Android native libraries.These shared libraries are all written in C or C++, compiled for the particular hardware architecture used by the phone, and preinstalled by the phone vendor.

  Also sitting on top of the kernel is the Android runtime, including the Dalvik virtual machine and the core Java libraries. The Dalvik VM is Google’s implementation of Java, optimized for mobile devices. All the code you write for Android will be written in Java and run within the VM. 

  Sitting above the native libraries and runtime, you’ll find the Application Framework layer. This layer provides the high-level building blocks you will use to create your applications. The framework comes preinstalled with Android, but you can also extend it with your own components as needed.

  A few objects are defined in the Android SDK that every developer needs to be familiar with. The most important ones are activities, intents, services, and content providers. 

  In addition, access to certain critical operations are restricted, and you must specifically ask for permission to use them in a file named Android-Manifest.xml. When the application is installed, the Package Manager either grants or doesn’t grant the permissions based on certificates and, if necessary, user prompts. Here are some of the most common permissions you will need:

  • INTERNET: Access the Internet.
  • READ_CONTACTS: Read (but don’t write) the user’s contacts data.
  • WRITE_CONTACTS: Write (but don’t read) the user’s contacts data.
  • RECEIVE_SMS: Monitor incoming SMS (text) messages.
  • ACCESS_COARSE_LOCATION: Use a coarse location provider such as cell towers or wifi.
  • ACCESS_FINE_LOCATION: Use a more accurate location provider suchas GPS. 

posted on 2010-01-08 22:35  Ray Z  阅读(268)  评论(0编辑  收藏  举报

导航