How to pass object from one activity to another in android
Posted
by kaibuki
on Stack Overflow
See other posts from Stack Overflow
or by kaibuki
Published on 2010-04-29T10:06:52Z
Indexed on
2010/04/29
11:37 UTC
Read the original article
Hit count: 801
Hi
I am trying to work on sending an object of my "Customer" class from one activity and display on other activity.
the code for the customer class : `package com.kaibuki;
public class Customer {
private String firstName, lastName, Address;
int Age;
public Customer(String fname, String lname, int age, String address) {
firstName = fname;
lastName = lname;
Age = age;
Address = address;
}
public String printValues() {
String data = null;
data = "First Name :" + firstName + " Last Name :" + lastName
+ " Age : " + Age + " Address : " + Address;
return data;
}
}
I want to send its object from one activity to another and then display the data on the other activity.
Please need urgent help.
Thanks alot
Kai`
© Stack Overflow or respective owner