tl;dr Launching an app straight from the Android Installer causes strange behavior and bugs within the app.
Over the past several days we've been chasing a bug in our app that caused very strange behavior. Every time the app was put into the background and then reopened by using the icon in the app drawer or an icon on the home screen, it would crash in the background and open the app like it was a fresh open without having been in the recent apps list. This caused us all sorts of issues, but the main one was that any messages that were registered for were never unregistered due to the crash in the background. This crash provides no stack trace and isn't caught by hockeyapp. When the app restarts, it then registers for all messages again. We spent days trying to figure out this issue, but it was difficult since the apk had to always come from our build server otherwise we would never see this issue. We eventually determined that it had nothing to do with the build server but with the Android Installer used when installing APKs. Opening the app by hitting "Open" at the end of the install caused the problem to manifest. Completely closing the app and clearing it from the recent app list, and opening it from app drawer fixes the issue and it never manifests again. Choosing "Done" and opening the app from the app drawer, the problem never manifests.
So, after all that, my question. Why would opening it in this manner be any different than opening it from the app drawer? Does the installer open it in a "safe" environment that maybe prevents need access to operate fully? I'm really just looking for any information on why the app behavior would be different when opening straight from the installer. Thanks ahead of time for any help.