3

How to use startActivityFromChild(Activity child, Intent intent, int requestCode)?

  1. What does child mean?
  2. What does requestCode mean?
Maksim Dmitriev
  • 5,985
  • 12
  • 73
  • 138

1 Answers1

0

It seems that these methods are ill named. Name indicates usage similiar to startActivity(Intent).

In fact these are more like callbacks. When fragment (embedded in activity) or child activity(embedded TabActivity) this is passed to the parent activity to handle.

so embedded activity fires intent -> parent activity recieves startActivitiyFromChild/Fragment. You can go for default implementation or make your own.

requestCode is id of the request so they can be matched when responding.

madabrowski
  • 1,273
  • 14
  • 17