July 2015
Beginner to intermediate
600 pages
18h 59m
English
The simplest way one activity can start another is with the startActivity method:
public void startActivity(Intent intent)
You might guess that startActivity(…) is a static 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, as shown in Figure 5.7.
Figure 5.7 Starting an activity
How does the ActivityManager know which Activity to ...
Read now
Unlock full access