I try to open a pop up whith the choice of 2 phone number when clicking on a marker on maps.
I try to follow instructions here :
Show popup above map marker in MapView
but ItemizedOverlay method doesnt work.
here is my onmarker onMarkerClik :
gMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(Marker arg0) {
// Open a pop up with phone number to call
return true;
}
});
What can I put in it to have my pop up ? to have this :
Thank you
I finally resolved it by showing the contacts that have a phone number registered :
gMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(Marker arg0) {
Intent pickContactIntent = new Intent(Intent.ACTION_PICK, Uri.parse("content://contacts"));
pickContactIntent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE); // Show user only contacts with phone numbers
startActivityForResult(pickContactIntent, PICK_CONTACT_REQUEST);
return true;
}
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.