Thank you for your reply. I have stepped through the code and have seen what you are talking about. It calls onSaveInstanceState and saves the data in the Bundle. Will this Bundle information be available when the activity restarts after the OS kills the process? I guess I did not check to see if the Bundle had that kind of information when the app returned.
Jake On Mar 8, 12:24 pm, Mark Murphy <[email protected]> wrote: > jgostylo wrote: > > This is what I am doing: > > > Activity SplashScreen is the launching activity for my app. It sends > > a request to my server and gets back a user data it then uses to > > populate a user object which is a static object. Once it has that it > > calls the MyMapView activity and finishes itself. > > > A force close occurs when I hit the home button and then open up > > enough other apps so that Android kills MyMapView to get more > > resources. Now when I open my app again it tries to start MyMapView > > and bypasses SplashScreen. There is no user object so I get null > > pointer exceptions. > > > I have tried to Override the onSaveInstanceState and > > OnRestoreInstanceState but it seems that those are not available when > > Android kills the activity. > > No, but onSaveInstanceState() will be called in and around the onPause() > and onStop() calls, so they most definitely will have been called by the > time your process is terminated, given your above scenario. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > _The Busy Coder's Guide to Android Development_ Version 3.0 > Available! -- 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

