开发者

How can I define what make start activity?

开发者 https://www.devze.com 2023-02-13 01:31 出处:网络
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

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

精彩评论

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