Send Data to the other Activity

by Android » Wed, 07 Jan 2009 18:27:02 GMT


Sponsored Links
 Hi,

I am trying to start a new Activity from my Activity. For this am
creating an intent as

Intent sendIntent = new Intent(this,Newactivity.class);
startActivity(sendIntent);

With the above i am able to launch my new Intent.
If I want to send some data from Current Activity to the Newactivity
(Where my Newactivity have a text box). The data i send from
CurrentActivity to Newactivity should be displayed in this text box.

Can anyone help me out how to do this ?

Thanks.

--~--~---------~--~----~------------~-------~--~----~



Send Data to the other Activity

by Mark Murphy » Wed, 07 Jan 2009 21:01:27 GMT


 


You'll want to use the "extras" in Intents. Look at putExtra() and the
corresponding getXXXExtra() (where XXX is some data type).

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ Version 1.9 Published!

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Send Data to the other Activity

by PRATAP SOLAPUR » Fri, 09 Jan 2009 00:01:17 GMT


 To your Intent add the data using
putExtra()
method and in the second activity in which u want to display use
getIntent().get.Extra()
 to retrieve ur data n then display








--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Android Programming Class

Hello everyone:

I teach an 8th grade programming class in San Antonio Texas. We're
learning Android and I convinced the school to buy us 3 dev phones for
the kids.

Here's an article about what we're doing:


http://www.neisd.net/ComRel/News/Krueger_Smartphone_10.htm

I'd like to purchase a netbook to supplement the phones so that when
the students check them out, they have an out-of-the-box programming
environment within which the phones work.

I've put together a donation page. My goal is to raise $350 dollars
for a netbook to go along with these devices. If you can donate $1,
$5, or $10 to help my class out, it would be greatly appreciated.

http://www.linuxclassroom.com/donation/donate.html

Thanks so much for considering it!

Josh Beck

-- 

2. Throwing an event in an Application, handling it in an Activity




Sure. All of your activities have access to the one application
(getApplication()), so they can register and unregister themselves with it
in onCreate and onDestroy.)

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 

3. Pushing up views above soft keyboard

4. help: Multiple broadcast receivers in the same process: Do they all run in the main thread??

5. Custom ListAdapter questions

6. App causing crash/reboot cycle

7. what is the kernel process to manage the device i/o ctrl?