Tag Archives: lifecycle

15,175 views

Activity LifeCycle source code for your testing Android example

onCreate(), onStart(), onResume(), onPause(), onSaveInstanceState(), onStop(), onRestart(), onDestroy() Android example source code. AndroidLifeCycle.java // license http://www.apache.org/licenses/LICENSE-2.0 public class AndroidLifeCycle extends Activity { /*onCreate() called when the activity is starting. This is where most * initialization should go: calling setContentView(int) to … Continue reading

Posted in Android Examples Code | Tagged , | Comments Off on Activity LifeCycle source code for your testing Android example
6,778 views

Activity lifecycle if application reopened Android emulator example

First step was hidden application after HOME button was pressed. Second step is restart application if user clicked on application’s icon. 20:35:54.028: VERBOSE/BackupManagerService(60): Backup requested but nothing pending   // reopen – rerstart application if long time is emulator disuse … Continue reading

Posted in Android Examples Code | Tagged , , | Comments Off on Activity lifecycle if application reopened Android emulator example
5,651 views

Activity Lifecycle if button Home pressed Android example

If on Android emulator home button pressed. // button home presssed 19:37:06.727: INFO/ActivityManager(60): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher } from pid 60   19:37:06.807: INFO/onSaveInstanceState(339): onSaveInstanceState() 19:37:06.848: INFO/onPause(339): onPause() 19:37:07.968: INFO/onStop(339): onStop() Diagram of Activity lifecycle if button … Continue reading

Posted in Android Examples Code | Tagged , , | Comments Off on Activity Lifecycle if button Home pressed Android example