how to know the calling activity in android

后端 未结 7 432
余生分开走
余生分开走 2020-11-29 11:59

I have an activity which is called by few other activities. For example: I have Activity1,Activity2,Activity3. Activity1 calls Activity2 and pass parameter. Activity3 also c

7条回答
  •  失恋的感觉
    2020-11-29 12:36

    If you start the activity with startActivityForResult(Intent, int), then you can get calling activity by getCallingActivity().getClassName().

提交回复
热议问题