sorry, i have made a minor mistake ,the code given by me works perfectly and the "val" is displayed as excepted .
On Feb 24, 1:42 pm, gganesh <ganesh....@gmail.com> wrote: > but the code " your_extras.getExtras(myval) ; " > didn't work ,i suppose there is no such method in Bundle class > i tried as show below > Bundle your_extras = this.getIntent().getExtras(); > String val = (String) your_extras.get("myval"); > but the "val" doesn't gives me the required data > Any suggestions ? > Thanks > > On Feb 24, 10:46 am, dillirao malipeddi <dillir...@arijasoft.com> > wrote: > > > you have to > > use > > > Bundle your_extras = getIntent.getExtras(); > > > String val = your_extras.getExtras("myval"); > > > On Tue, Feb 24, 2009 at 11:08 AM, gganesh <ganesh....@gmail.com> wrote: > > > > hi friends, > > > i have two classes Screen1 and Screen2 both extends activity > > > i have to pass data from the Screen1 to Screen 2 > > > > i wrote in onCreate method of Screen1 class > > > > t=(EditText)findViewById(R.id.ed1); > > > b=(Button)findViewById(R.id.but1); > > > b.setOnClickListener(new Button.OnClickListener() > > > { > > > public void onClick(View v) > > > { > > > Intent i= new Intent(v.getContext(),Screen2.class); > > > i.putExtra("myval",t.toString()); > > > startActivity(i); > > > } > > > > My doubt is ,how to receive myval data in Screen2 class ,what is the > > > code i have to add in AndroidManifest.xml file > > > -- > > Dilli Rao. M > > ARIJASOFT > > +91 - 9703073540 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---