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
Post a Comment