Question: =+public void onActivityResult(int requestCode, int resultCode, Intent data) //---check if the request code is 1--- if (requestCode == 1) { //---if the result is OK---

=+public void onActivityResult(int requestCode, int resultCode, Intent data)

//---check if the request code is 1---

if (requestCode == 1) {

//---if the result is OK---

if (resultCode == RESULT_OK) {

//---get the result using getIntExtra()---

Toast.makeText(this, Integer.toString(

data.getIntExtra("age3", 0)), Toast.LENGTH_SHORT).show();

//---get the result using getData()---

Toast.makeText(this, data.getData().toString(), Toast.LENGTH_SHORT).show();

}

}

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Implementing Programming Languages Questions!