Hi,  I had written code but it is not working properly.
In my Serivce I have

Intent mIntent = new Intent(MyService.this, MarketWatchTest.class);
                                mIntent.putExtras(bundle);
                                mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

                        startActivity(mIntent);


An din my Activity inside onResume I had written code as

public void onResume()
    {
        super.onResume();
        Intent myIntent = getIntent();
        if (myIntent !=null && myIntent.getExtras()!=null)
        {
                System.out.println ("Inside onResume");
                Bundle bundle = getIntent().getExtras();
                        String res = bundle.getString("Response");
                        System.out.println ("@@@@@@@@@"+res);
        }
        System.out.println ("Outside if");
    }

But now my OnCreate method is called continously. (I know it will
because every time when Activity launches onCreate () get called). Due
to this UI set again and again. SOmeone Please give me an example that
demonstrate serice send data continously and activity display that
continous data. I had refers Dianne Hackborn example but I didn't get
that one. Thanks in advance
On May 13, 9:52 am, Dianne Hackborn <hack...@android.com> wrote:
> Follow the local service sample, and then this is just straight-forward Java
> language calls between them once they are hooked up.
>
> On Thu, May 12, 2011 at 8:39 PM, pramod.deore <deore.pramo...@gmail.com>wrote:
>
>
>
>
>
> > Hi all, In my application I am getting continously data from socket. I
> > had wrote this socket code in my service now I want to display this
> > data. So I want to send this data back to activity. In this activity I
> > will display data then when new data comes through service then I want
> > to again send this data to activity every time. How to transfer
> > continous data from service to activity? Thanks in advance.
>
> > --
> > 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
>
> --
> 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.- Hide quoted text -
>
> - Show quoted text -

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