pass object from one activity to other activity

Put your problem here if it does not fit any of the other categories.

pass object from one activity to other activity

Postby alpesh_harsoda » Thu Feb 03, 2011 1:27 pm

Can anyone tell me about how can i pass object to one class to other class?
Regards,
Alpesh Patel,
Logistic Infotech
http://www.logisticinfotech.com
User avatar
alpesh_harsoda
Senior Developer
Senior Developer
 
Posts: 106
Joined: Sat Sep 20, 2008 12:35 pm
Location: Rajkot,Gujarat(India)

Top

Re: pass object from one activity to other activity

Postby imbroken » Thu Feb 03, 2011 2:47 pm

if your object is serializable you can put it in the intent.
intent.putExtra()
imbroken
Senior Developer
Senior Developer
 
Posts: 131
Joined: Thu Jan 06, 2011 6:57 pm
Location: Germnay

Re: pass object from one activity to other activity

Postby Chitra » Tue Feb 08, 2011 2:06 pm

Hey,

By using putExtra we can able to pass string, integer, boolean, obj values....

//Class 1
intent.putExtra("UR_REF_ID","String");

//Class 2
String myStr = this.getIntent().getStringExtra("UR_REF_ID");
Thanks,
Chitra
User avatar
Chitra
Master Developer
Master Developer
 
Posts: 213
Joined: Mon Mar 01, 2010 7:59 am
Location: Now in Chennai

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: MSNbot Media and 17 guests