In the tutorial 41 by Travis, for handling the data which is being returned by phone's camera; He used onActivityResult() method.
Could you please explain each line inside the if statement?
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
Bundle extras = data.getExtras();
bmp = (Bitmap) extras.get("data");

  • What's the Bundle  and why was it used? Why do extras need to be handled with this special type?

  • What does the get("data") exactly do? Why is the "data" used as the argument? Should it have the same name as the Intent parameter is passed through onActivityResult?