Is there a decent way to detect through a android shared library when the app that references the library has gone into the background/foreground? The library has no access to any activities whatsoever, asides from Context.
i.e Can the library register a broadcast receiver to receive such events?