Android: Pressing back from within application called by main application error
<p>I have an application which in turn can call another application. In this second application the user can do some actions and the data is then returned to my main application. Everything works fine until the user goes into the second application and instead of doing the expected flow, presses the back button. </p>

<p>This will throw a null pointer exception in my OnActivityResult method in my main application because of course there is no data.</p>

<p>How do you handle something like this? Also, I do not have access to the second applications code so my application is just calling a third party piece of software.</p>
