How to detect when an Android app minimized? -


how detect when android app goes background? onpause() works called when orientation changed.

if orientation changes app call through life cycle once again means oncreate

you can avoid writing following code manifest

 <activity       android:name=""       android:configchanges="orientation|keyboardhidden|screenlayout|screensize"       android:label="@string/app_name" /> 

this tell system when orientation changes or keyboardhidden or screenlayout changes handle myself no need re create it.

then write code on on pause


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -