I was wondering, does anyone know how to get an address in a textview matched by the Linkify in Android and make it a clickable link?
I think I can figure out how to do this manually, but I was wondering if I have to match the address against a certain pattern so that it does this without me having to do it for Linkify?
I've seen other questions about this, but those are mostly outdated and never really got solved.
Could you point me in the right direction?
Below you can see how I do this manually with a longitude and latitude and the address itself.
mLocation.mImage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent callIntent = new Intent(Intent.ACTION_VIEW);
//callIntent.setData(Uri.parse("google.navigation:q=" + establishment.getStreet() + "+" + establishment.getHousenumber() + "+" + establishment.getPostalcode() + "+" + establishment.getCity()));
callIntent.setData(Uri.parse("geo:" + establishment.getLongitude() + ", " + establishment.getLatitude()));
startActivity(callIntent);
}
});
Thanks in advance.