I have a need to find a way to accurately track when an application is truly going into the background and coming back to the foreground. The standard OnPause and OnResume won't work in this instance as they aren't always called in only this situation. From what I've been reading, Android has the ability to implement this using ActivityLifeCycleCallbacks. The problem I'm having is that all the examples I'm finding are in Java. As such, I've not found a way to get it to work and convert it into something that can be run in C#. I've posted some links to try and shed some light on exactly what this could look like in Java.
Some other references to implementations of this.
Any additional information would be helpful.