1. display the call method
- intent = new intent (this, otheractivity. Class); // method 1
- intent intent2 = new intent ();
- intent2.setclass (this, otheractivity. Class); // method 2
- intent2.setclassname (this, "com. ZY. mutiactivity. otheractivity"); // method 3 this method can be used to open other applications
- intent2.setcomponent (New componentname (this, otheractivity. Class); // Method 4
- startactivity (intent2);
2. Call the method implicitly (as long as the action, category, data, and activity to jump to match in androidmanifest. XML, OK
3. After redirecting to another activity, data can be returned when the returned result is returned.
- on the jump activity side, call startactivityforresult (intent2, 1) to jump to the next activity. The first parameter is the passed intent object, and the second is the Set Request Code;
- after jumping to the second activity, call the setresult (100, intent) method to return the previous activity. The first parameter is the result code, and the second parameter is the passed-in intent object;
- In the first activity, the onactivityresult () method is used to obtain the returned data.