March 2013
Beginner to intermediate
580 pages
16h 11m
English
The simplest way one activity can start another is with the Activity method
public void startActivity(Intent intent)
You might guess that startActivity(…) is a class method that you call on the Activity subclass that you want to start. But it is not. When an activity calls startActivity(…), this call is sent to the OS.
In particular, it is sent to a part of the OS called the ActivityManager. The ActivityManager then creates the Activity instance and calls its onCreate(…) method.
Figure 5.8 Starting an activity

How does the ActivityManager know which Activity to start? That information is in the Intent parameter.
Read now
Unlock full access