I have a main activity which parses the JSON data from my mysql (table tracking:Lattitude and longitude) Now I want to pass this data in to my MapActivity and display on google
You need to get bundle from another class : this class will be for your mapActivity
Bundle b = getIntent().getExtras(); // Getting the Bundle object that pass from another activity
int SelectedPropertylat = b.getInt("SelectedLat");
int SelectedPropertylong = b.getInt("SelectedLong");
String lattitude = Integer.toString(SelectedPropertylat);
String longertude = Integer.toString(SelectedPropertylong);
Log.d(lattitude,longertude);
And taking datafrom mysql into your apps use this :
try{
JSONArray earthquakes = json.getJSONArray("PropertyDetails");
for(int i=0;i
then convert lat and long into an string like :
lonnng = Integer.parseInt(lonng.toString());
latt =Integer.parseInt(lat.toString());
then pass the data into your mapview like this :
Intent moreDetailsIntent = new Intent(PropertiesDetails.this,mapActivity .class);
Bundle dataBundle = new Bundle();
dataBundle.putInt("SelectedLong",lonnng);
dataBundle.putInt("SelectedLat", latt);
moreDetailsIntent.putExtras(dataBundle);
startActivity(moreDetailsIntent);