Check which app run second
<p>I have a problem. I have one big application and some smalls applications. Big application need id to download from webservice some data. That id get from small aps. I start small aps and using intent.putExtra I send id to MainActivity from big app. Schema is something like that: run small app -> small app send id to big app and run it -> MainActivity get id and get some data from webservice -> MainActivity run secondActivity with data. Now I have a problem, because when I start application first time I get correctly data etc. When I close application and run again other small app I get correct data. But problem is when I run first app and when download data I don't close app, but use home button and start other small app with other id. In that case big application doesn't start from MainActivity. That app start from onResume from secondActivity and in secondActivity I have old id so I get wrong data. How I can send to onResume correct id? I thinking about killing big app when I click home button, but this is bad solution because I can start other app from menu button. How can I check in onResume in secondActivity which application start big application or send to onResume good id and start MainActivity again? Maybe you have some idea how can I solve my problem?</p>
