I logged all the functions and got to know the thing. But I don't know
why its happening. just need suggestion from somebody.

When Im in Activity A. I open browser for twitter authentication.
That time i logged. On pause, on stop are called in activity.

Now when i authenticate in browser then browser goes back to activity.

But as i m using startactivityforresult it should go to method
"onActivityResult"
but it goes to onCreate

I dont want that. can anyone help on this ?

On Nov 24, 3:22 pm, umakantpatil <[email protected]> wrote:
> Emailed you the code. Its not that complicated.
> I have also described in email , which functions does what..
> Hope you help me out.. My head has gone mad. I cant get it anymore..
>
> Thanks
>
> On Nov 24, 2:58 pm, Kumar Bibek <[email protected]> wrote:
>
>
>
>
>
>
>
> > I really cannot suggest you anything without looking at your whole code now.
> > Sorry.
>
> > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
>
> > On Wed, Nov 24, 2010 at 3:23 PM, umakantpatil 
> > <[email protected]>wrote:
>
> > > See..
> > > I have page which show article. On menu click a function it sets new
> > > content as below
>
> > > setContentView(R.layout.sharing);
>
> > > Now this layout has edittext and button. On click on button ..It goes
> > > as given in that tutorial..
> > > But when use authenticates..
>
> > > Then in onResume I get error because I think he cant find that
> > > edittext.
>
> > > But as our activity is resuming, then that our last layout was
> > > R.layout.sharing
> > > It should open na ? And as i said that layout has edittext where has
> > > typed something.
> > > ..
>
> > > One more input ..
> > > I added log in my onCreate and onResume
> > > So when user comes back from broswser. onCreate is also getting
> > > called. and after that onresume is getting called.
> > > Just because oncreate is getting called. our last layout is not there.
> > > It just shows articles list.
>
> > > On Nov 24, 2:46 pm, Kumar Bibek <[email protected]> wrote:
> > > > Umm,
>
> > > > I am still confused. How are you changing the content view of the
> > > Activity.
> > > > Is it really required? If you are getting NullPointer exception, then it
> > > > means that the EditText that you are trying to initialize is not
> > > presently
> > > > on the Activity. It's simple enough, if you see the EditText on your
> > > > activity, only then you can initialize it through the findViewById call.
>
> > > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
>
> > > > On Wed, Nov 24, 2010 at 3:07 PM, umakantpatil <[email protected]
> > > >wrote:
>
> > > > > I posted two messages here. One of them is missing...
>
> > > > > Let again explain everything..
>
> > > > > I do all this stuff in single activity.
> > > > > onCreate I list articles.. On click on any single article I open that
> > > > > article.
> > > > > So there are options to share. On click of that I open a page in same
> > > > > activity using setcontentview.
> > > > > It has edittext and button. Now on click of button browser opens. User
> > > > > provides username and password.
> > > > > Twitter passed me back auth. After that
> > > > > "onResume"  ( onResumeActivity i wrote by mistake )
> > > > > I wrote such code.
> > > > >        protected void onResume() {
> > > > >                super.onResume();
> > > > >                Uri uri = this.getIntent().getData();
> > > > >                //
> > > > >                // Here its more to get data....
> > > > >                //
> > > > >                EditText content2 = (EditText)
> > > findViewById(R.id.content);
>
> > > > >  twitter.updateStatus(content2.getText().toString()+"..#testing");
> > > > >      }
>
> > > > > It gives me error. Well if remove Edit text and post some dummy status
> > > > > then it works and I can see all articles list instead of that share
> > > > > page.
>
> > > > > On Nov 24, 2:17 pm, umakantpatil <[email protected]> wrote:
> > > > > > As i told that I used
>
> > > > > > EditText content = (EditText) findViewById(R.id.content);
> > > > > > twitter.updateStatus(content.getText().toString() + " #testing");
>
> > > > > > If i remove
> > > > > > EditText content = (EditText) findViewById(R.id.content);
>
> > > > > > and  directly post.
> > > > > > twitter.updateStatus("Testing my tweets #testing");
> > > > > > then it works and my list of articles is listed.
>
> > > > > > On Nov 24, 12:55 pm, Kumar Bibek <[email protected]> wrote:
>
> > > > > > > The textview from which you want to read the text is in the same
> > > > > activity
> > > > > > > where onResume/onActivityResult is there?
>
> > > > > > > BTW, there is no such thing as onResumeActivity. You should be
> > > > > overriding
> > > > > > > the onActivityResult method.
>
> > > > > > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
>
> > > > > > > On Wed, Nov 24, 2010 at 1:16 PM, umakantpatil <
> > > [email protected]
> > > > > >wrote:
>
> > > > > > > > I'm integrating twitter OAuth in my app. He can share article on
> > > > > > > > twitter by posting it.
>
> > > > > > > > So when i click on option share button. I show user a TextView
> > > where
> > > > > > > > he can add extra content.
>
> > > > > > > > I got how to do OAuth from this tutorial
>
> > > > >http://vasudevkamath.blogspot.com/2010/09/android-oauth-authenticatio.
> > > ..
>
> > > > > > > > It works fine. But after giving username and password to twitter
> > > it
> > > > > > > > redirects me back to my app.
> > > > > > > > After coming to my app. In "onResumeActivity" I want to post
> > > status.
> > > > > > > > So I want to read what user wants to post. So i read TextView
> > > value
> > > > > > > > (using findViewById) but it gives error.
> > > > > > > > If i post dummy text then it works and It doesn't come to the
> > > same
> > > > > > > > page where i showed him textview. I think it restarts my
> > > activity.
>
> > > > > > > > So i want something that in resume activity I can read user 
> > > > > > > > value
> > > > > > > > which he entered in textview to post. Whats the problem I cant
> > > find
> > > > > > > > this.
>
> > > > > > > > --
> > > > > > > > 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]<android-developers%2Bunsubs
> > > > > > > >  [email protected]><android-developers%2Bunsubs
> > > [email protected]><android-developers%2Bunsubs
> > > > > [email protected]>
> > > > > > > > For more options, visit this group at
> > > > > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > > --
> > > > > 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]<android-developers%2Bunsubs
> > > > >  [email protected]><android-developers%2Bunsubs
> > > [email protected]>
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > 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]<android-developers%2Bunsubs
> > >  [email protected]>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en

-- 
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

Reply via email to