1. FirstActivity in sending code is as follows:
Intent Intent=new Intent (FirstActivity. This, SecondActivity. Class);
String data="https://bbs.csdn.net/topics/second activity";
Intent. PutExtra (" extra_data ", data);
startActivity(intent);
2. SecondActivity, in the onCreate () method, receiving code is as follows:
Intent Intent=getIntent ();
String data=https://bbs.csdn.net/topics/intent.getStringExtra (" extra_data ");
CodePudding user response:
There should be no mistake, it is an error? Or pass is not in the past?