开发者

How to know what Activity has started the current Activity

开发者 https://www.devze.com 2023-01-20 14:12 出处:网络
How can I know what Activity has started the current Activity? Is there any specific method like, i.e. getIntent().getCallerActivity() or the only way is saving some information开发者_如何转开发 withi

How can I know what Activity has started the current Activity? Is there any specific method like, i.e. getIntent().getCallerActivity() or the only way is saving some information开发者_如何转开发 within the Intent using putExtra()?

Thanks.


There's getCallingActivity which you can use to get the name of the calling activity if you started the sub-activity with startActivityForResult.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号