Android Development Notes-2

Summary:SDK, ADB, Active, Intents and Tasks

-The Android SDK is made of mostly off-the-shelf components, plus some purpose-built components. In many cases, configurations, plug-ins, and extensions adapt these components to Android. The Android SDK is a study in the efficient development of a modern and complete SDK. 

-adb is a program that enables you to control both emulators and devices, and to run a shell in order to execute commands in the environment of an emulator or device. 

-The Dalvik Debug Monitor Server (DDMS) is a traffic director between the single port that Eclipse (and other Java debuggers) looks for to connect to a Java Virtual Machine
(JVM) and the several ports that exist for each Android device or virtual device, and for each instance of the Dalvik virtual machine (VM) on each device. 

Android Development Notes-2_第1张图片

-Android introduces a richer and more complex approach by supporting multiple application entry points. Android programs should expect the system to start them in different places, depending on where the user is coming from and what she wants to do next.

-An Android activity is both a unit of user interaction—typically filling the whole screen of an Android mobile device—and a unit of execution. When you make an interactive Android program, you start by subclassing the  Activity class. 

-How, then does one activity invoke another, and pass information about what the user wants to do? The unit of communication is the  Intent class. An  Intent represents an
abstract description of a function that one activity requires another activity to perform

public class TestActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
-When the system starts this activity it calls the constructor for  TestActivity , a subclass of  Activity , and then calls its  onCreate method. This causes the view hierarchy described in the main.xml file to load and display. The  onCreate method kicks off the life cycle of the  Activity

-Each activity in an Android application is largely separate from other activities

-applications describe an Intent that they want to execute and ask the system to find one that matches

Android Development Notes-2_第2张图片


Next: Android Component

你可能感兴趣的:(android,sdk,dalvik)