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 Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Wed, Nov 24, 2010 at 3:07 PM, umakantpatil <umakantpat...@gmail.com>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 <umakantpat...@gmail.com> 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 <coomar....@gmail.com> 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 <umakantpat...@gmail.com
> >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
> android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com><android-developers%2Bunsubs
> cr...@googlegroups.com>
> > > > 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 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

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