Answer the question
In order to leave comments, you need to log in
The Bundle passes the string data, but the class does not accept it. What to do?
Essence of the question: I pass several values of different types to another class
By type
toResults.putExtra("text", s);
toResults.putExtra("xp", xp);
toResults.putExtra("isfirst", true);
final Bundle bundle = getIntent().getExtras();
if (bundle!=null){
s = bundle.getString("text");
...
}
Answer the question
In order to leave comments, you need to log in
What if you try it?
Intent intent = getIntent();
String message = intent.getStringExtra("text");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question