When we want to pass data from an activity to a sub activity we use the
intent.pushextra()
method and pass the request code and any additional
You use intent.putExtra() to put data in the intent, then in the sub activity's onCreate() use getIntent().getExtras() or getIntent().getXXXExtra() methods.
intent.putExtra()
onCreate()
getIntent().getExtras()
getIntent().getXXXExtra()
For example for retrieving a String you would use: getStringExtra()