hi i am passing the latitude,longitude and address using a bundle to another activity. in another activity i am retrieving data from the bundle. but when i click the button on which bundle is used the app crashes. i cant post the logcat as nothing comes in ddms. i m using the device debug mode. heres my code:
Bundle b=new Bundle();
b.putString("latitude", lat+"");
b.putString("longitude", lon+"");
b.putString("address", result1);
Intent i=new Intent(Cortes.this,Display.class);
i.putExtras(b);
startActivity(i) ;
i am writing this in listener of button and Display is the another activity. in that activity my code is:
Bundle b=this.getIntent().getExtras();
latitude=b.getString("latitude");
longitude=b.getString("longitude");
address=b.getString("address");
i am displaying db in that activity in a tablelayout.
cursor for that i have written in another activity named Display.in cursor i am using the values which i am passing to another activity
pls help
try this
or