Thank you for the post. It’s a really cool approach. I did however run into a small problem that I wanted to share in case someone else also runs into it. If you use this approach in combination with Instant Run in AS the application instance that is returned by `getContext()` is NOT the real application instance. The returned application is an instance of the Instant Run application called `BootstrapApplication`. The problem I ran into is when trying to register a `ActivityLifecycleCallbacks`, it is actually registered to the `BootstrapApplication`and NOT the real application.
A simple solution is to simply disable Instant Run.