0

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 :

enter image description here

Thank you

Community
  • 1
  • 1
Aznhar
  • 610
  • 1
  • 10
  • 30
  • What kind of popup do u need?do u need a popup in which u can select the way of calling application use?is that so ? Correct me if i m wrong.if possible post the screenshot...it vl help alot... – Amaresh Jana Oct 22 '15 at 21:18
  • It's a pop up who put 2 phone number for exemple '123' and '456'. it can be call with the default phone app. it look like this : http://imgur.com/DFaMWfS thank you for your help ! – Aznhar Oct 23 '15 at 16:31
  • You can use **linkify** to make the calls directly onclicking the mobole number..... – Amaresh Jana Oct 23 '15 at 20:36
  • Once search about linkify in android u vl be getting everyrhing..if that is the thing u r searching for tell me know i vl send u all the code in here... – Amaresh Jana Oct 23 '15 at 20:36

1 Answers1

0

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;

    }
}); 
Aznhar
  • 610
  • 1
  • 10
  • 30