B4A Class Contact Picker

Discussion in 'Additional libraries, classes and official updates' started by Pooya1, Aug 16, 2018.

  1. Pooya1

    Pooya1 Active Member Licensed User

    Hi
    I convert all code about select contact to single class easily
    This class need to ContactUtils.

    Example :
    Code:
    Dim a As ContactPicker
    a.Initialize(Me,
    "contact")
    a.ShowPicker

    Sub contact_contactchooser(contact As Contact)
        
    Log(contact)
    End Sub
     

    Attached Files:

  2. Star-Dust

    Star-Dust Expert Licensed User

    Put some image of the final result, it can be useful to make the idea ;)
     
    Sandman likes this.
  3. Pooya1

    Pooya1 Active Member Licensed User

    It is simple process my friend
    I show contact list with Intent and after select,return result into class and in class i return it to user event :D
     
    ocalle likes this.
  4. fbritop

    fbritop Active Member Licensed User

    How can we achieve multiple contacts select?
    I have tried:
    Code:
    i.PutExtra("additional""phone-multi")
    With no success
     
  5. DonManfred

    DonManfred Expert Licensed User

    1. You should create a new thread for any question you have
    2. I don´t think it is possible. Androids Contactpicker api return ONE Result.
    3. You need to build your own solution i guess. Get a List of all Contacts using ContentResolver. Or directly get a filtered list using some filters in the Content-Resolver Query. You can find some inspiration here (it is working with Google Calendars, not with Contacts. But the principle is the same. It also works with Contacts.)

    Edit to add: Check ContactUtils class. It is based on contentResolver.
    https://www.b4x.com/android/forum/t...-access-to-the-stored-contacts.30824/#content
    You can get some inspiration here too i guess.
     
    Last edited: Apr 25, 2019
  6. Sasuke Sama

    Sasuke Sama Active Member Licensed User

    im having issues using this with the phone lib they both use the " contact " var
    any idea how to solve?
     
  7. ronell

    ronell Well-Known Member Licensed User

    you can edit the class file and change the variables

    also, create new thread in the android question forum if you have more questions
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice