It is unlikely this has anything to do with saving and restoring instance state, unless a configuration change is happening or your process is being killed in the background.
If you are saying that you are seeing onCreate() called, then again I think you should consider that you actually have a new instance of the activity being started, and look at the logcat output if there is a log about starting an activity. On Sun, Dec 12, 2010 at 9:02 AM, bobetko <bobe...@gmail.com> wrote: > Sorry. Yes. You are right. onCreate runs first, then onResume next. (I > am still learning about Android activity cycle :-) > Here is my onResume method that handle this data that comes from > Twitter. > See lines 5 and 6. If 6 is true I am extracting token and secret and > saving them to SharedPreferences. This code runs fine, just that RowID > variable gets lost in the process. onCreate that runs before this one > (onResume), has no idea about RowID. > > @Override > protected void onResume() { > super.onResume(); > Log.d(TAG, "mRowID onResume : " + mRowId); > Uri uri = this.getIntent().getData(); > if (uri != null && uri.toString().startsWith(CALLBACK_URL)) { > SessionPilot appState = > ((SessionPilot)getApplicationContext()); > consumer = appState.getConsumer(); > provider = appState.getProvider(); > String verifier = > uri.getQueryParameter(oauth.signpost.OAuth.OAUTH_VERIFIER); > try { > provider.retrieveAccessToken(consumer, verifier); > Utils.StoreStringToPrefs("twitterToken", > consumer.getToken(), PREF_FILE_NAME ,this); > Utils.StoreStringToPrefs("twitterSecret", > consumer.getTokenSecret(), PREF_FILE_NAME ,this); > } catch (Exception e) { > Log.e(APP, e.getMessage()); > } > } > } > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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