protected void onUserLeaveHint () Added in API level 3
Called as part of the activity life cycle when an activity is about to go into the background as a result of user selection. For example, when the user presses the Home key, onUserLeaveHint () is called, but when an incoming phone call causes the asset in the call to be automatically brought to the forefront, onUserLeaveHint () will not be called when the activity is interrupted, In cases where it is called , this method is called immediately before the onPause () call is active.
This callback and onUserInteraction () are designed to help actions efficiently manage status bar notifications; in particular, in order to help events determine the appropriate time to cancel the notification.
the code: -
@Override protected void onUserLeaveHint() {
duggu source share