I have a ListView and when i click a single item it goes to single item view . in each single item view page there is a location button .I need to go to google map when click the location button
longtitute and latitudes are saved in database like this . I want to call this dynamically in EACH CELL OF THE COLUMN , data is stored like this,
the data is stored as object inside parse database, not as strings
{"lat":25.1250241,"lng":55.3752069}
anyone knows please tell how can i get data from this?
btn = (Button) findViewById(R.id.button5) ;
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
btn = (Button) findViewById(R.id.button56) ;
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
String data = String.format("geo:%s,%s", latitude, longitude);
intent.setData(Uri.parse(data));
startActivity(intent);
}
});
finally found way ..
Use Below method to parse your data from String you need pass one paramaeter in below method when I passes string.