Is it possible to intercept the event of turning off the phone, or perhaps use a different hack? I always have a service running that is part of a non-market application that collects some analytic data. I would like to inform the analyst about the end of the session and the message, and then resume the system shutdown.
I tried to trigger an event from the onDestroy or onShutdown components, but the phone will turn off without telling the time.
By working around this, making many short sessions based on activity screens, you get information about insensitive analytics that I would like to avoid.
Tim capes
source share