A 'compatibility' version of the ActivityLifecycleCallbacks APIs that were introduced in Android 4 (API Level 14) and adding similar mechanism for Fragment.