"onResume runs first then onCreate" -- that is not typical.  Either your
activity is being restarted (due to a configuration change) or you have a
new instance created.

Also what do you mean by "Twitter sends Intent (with token and secret) back
to my activity"?  Do you mean it is using setResult()?  Or is this doing
something else?

And do please have a look at the logcat output to see what activities are
being started.

On Sun, Dec 12, 2010 at 8:18 AM, bobetko <bobe...@gmail.com> wrote:

> Thanks Dianne,
>
> I've look at logs and my app is crashing because my RowID value is
> null. RowID is record ID that is needed to query sqlite database.
> I could post here all my code, but I doubt it would be very useful...
> I'll try explaining better with some code snippets:
>
> This is what I execute when user push Authorize button:
>
> consumer = new CommonsHttpOAuthConsumer(CONSUMER_KEY,
> CONSUMER_SECRET);
> provider = new DefaultOAuthProvider("http://twitter.com/oauth/
> request_token",
>     "http://twitter.com/oauth/access_token";,
>     "http://twitter.com/oauth/authorize";);
> String authUrl = provider.retrieveRequestToken(consumer,
> CALLBACK_URL);
> mWebView.loadUrl(authUrl);
>
> User is presented with login and password fields and there is also
> Allow button. When user pushes this Allow button, Twitter sends Intent
> (with token and secret) back to my activity. I process this Intent in
> onResume method. OnResume runs first, then onCreate. At this point my
> RowID is lost. Nowhere in this process onSaveInstanceState was called
> because of simple reason, activity is not paused, exited, screen is
> not rotated, etc... So, how do I save and retrieve my RowID? Thanks.
>
> --
> 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

Reply via email to