onCreate will be called whenever your activity is being run and the system has no currently running instance of your app (say they run your app yesterday and between then and now they run Browser, Gmail, and a couple games--chances are the memory allocated to your app has been freed so the games could use it and your running app has now been completely destroyed--requiring the system to restart your app entirely, calling onCreate). If your memory has not been purged since your last run, when your activity starts it will skip onCreate and go straight to onResume.
Basically, any code that you need to run every time the user opens your activity should go in onResume, not onCreate. -Nick On Apr 5, 11:04 am, hiwa <[email protected]> wrote: > > How to call Activity's onCreate() method each time it starts? > > > Only first time when installed on device it calls onCreate method. > > If I have understood you correctly, then you need to read a bit more > about Activity in general (http://developer.android.com/reference/ > android/app/Activity.html). But to answer your question, your > applications main Activity is launched every time your app is started. > There is no way to call "onCreate" again and again on any activity in > general, you can call restart and resume to run code, but cannot call > onCreate itself unless you kill the activity or call onStop(). > > Hiwa -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.

