Umm, well im trying to pass an long that is extracted from a calendarview using getDate() method and set it to a long and pass it.. it works for one button i have mutiple buttons in the same interface and for the first button it works fine but for hte send one im having and issue as the data is not being passed :S
//THis one passes the long without any issues
Create = (Button) findViewById(R.id.CreateApp);
Create.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
finish();
long date = Present.getDate();
Intent Crea = new Intent(getApplicationContext(),CreateAppointment.class);
Crea.putExtra("SelectedDate", date);
startActivity(Crea);
}
});
//code when recieving in another class
Intent g = getIntent();
final long SDate = g.getLongExtra("SelectedDate", 0);
//THE PROBLEM ONE :S
Edit = (Button) findViewById(R.id.VEditApp);
Edit.setOnClickListener(new OnClickListener() {
public void onClick(View arViewg0) {
finish();
long date = Present.getDate();
Intent EDT = new Intent(getApplicationContext(),viewedit.class);
EDT.putExtra("EDTDate", date);
startActivity(EDT);
}
});
// WHat i use to recieve in the other class
Intent EditRecieve = new Intent();
long Cur_Date = EditRecieve.getLongExtra("EDTDate", 2);
Can someone tell me why i am not getting the value and why the default value is kept on being passed?