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

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

unity3d - Rotate an object to face an opposite direction -

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