android - Check if an Activity was triggered by a particular Activity -


is possible check activity triggered particular activity.

for example, have 2 activities, activity , activity b , triggered b using intent. , in activity b, want check activity b triggered activity a, like:

if(activity b trigger activity a) { //do }

you can use

getcallingactivity(); 

to name of activity started current activity. should consider why need functionality. activities should loose coupled.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -