So what do you think is anything better than these options?
Anything better than # 2, which requires special firmware.
# 1 is your only option in the SDK for API level 13 in down AFAIK.
API level 14 (aka, Android 4.0) has been added to Application.ActivityLifecycleCallbacks , which you can register with registerActivityLifecycleCallbacks() called on your Application (e.g. getApplicationContext() ). I have not used them yet, but it seems that you can organize a notification of one of the listeners about upcoming and upcoming actions, avoiding forcing to extend some common base class of Activity with the required logging.
source share