How to pass object from one activity to another in android
- by kaibuki
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`