Actually, the better way is probably the following (from
http://developer.android.com/guide/topics/fundamentals.html#lcycles):

The visible lifetime of an activity happens between a call to
onStart()  until a corresponding call to onStop(). During this time,
the user can see the activity on-screen, though it may not be in the
foreground and interacting with the user. Between these two methods,
you can maintain resources that are needed to show the activity to the
user. For example, you can register a BroadcastReceiver  in onStart()
to monitor for changes that impact your UI, and unregister it in
onStop() when the user can no longer see what you are displaying. The
onStart() and onStop() methods can be called multiple times, as the
activity alternates between being visible and hidden to the user.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to