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.
精彩评论