Y
Y
ywitodenasuby2019-01-12 00:27:23
Android
ywitodenasuby, 2019-01-12 00:27:23

How to determine the activity that called onResume()???

There is an activity1 with a button. If you press the button, the activity2 will open. If you press back in activity2, the onResume() event in activity1 will fire.
How do I know from activity1 that onResume() called activity2 and not 3 or 4...?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2019-01-12
@ywitodenasuby

1) the activity does not call onResume.
2) to determine, you can use the startActivityForResult / onActivityResult mechanism

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question