开发者

How can I define what make start activity?

my app is 开发者_运维知识库like cycle . first a activity starts. then b . this goes on like c,d and again a. How can I know that a is run by what ? is a normal app starting or have made an intent it run ?


you could add some extra to the intent when activity "d" is starting activity "a", and check for this extra.


You can use getCallingActivity() on the activity to get the name of the activity that invoked this activity.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜