Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof of Concept: Contacts Picker in Cordova #3301

Closed
DaleMcGrew opened this issue Sep 1, 2021 · 4 comments
Closed

Proof of Concept: Contacts Picker in Cordova #3301

DaleMcGrew opened this issue Sep 1, 2021 · 4 comments
Assignees

Comments

@DaleMcGrew
Copy link
Member

Set up a proof of concept in the Cordova App where a voter can access the contacts on their phone (iOS or Android). This is a link to the mockup: https://invis.io/SGZXU91H7R6#/442831992_Paid-Recruit-2a-Add_Contacts_Index

From your earlier notes:
It looks like iPhone/Android contacts are not available to JavaScript apps, only native (or Cordova) apps. (It kind of makes sense!)
https://web.dev/contact-picker/
PS. This second one seems to be deprecated: https://github.com/apache/cordova-plugin-contacts

@SailingSteve
Copy link
Member

SailingSteve commented Dec 3, 2021

This is what we get -- no addresses or other more private data (sample data on a simulator)

[
   {
      "emails":[
         {
            "id":"93D6F4AF-5C10-43FC-8405-A8BB02F2F9F7",
            "type":"work",
            "value":"kate-bell@mac.com"
         }
      ],
      "phoneNumbers":[
         {
            "id":"EF48385D-28C2-48DE-AAB3-A81BC5F16981",
            "type":"mobile",
            "value":"(555) 564-8583"
         },
         {
            "id":"3CD5F927-B150-4104-918B-C26DD6AC811B",
            "type":"other",
            "value":"(415) 555-3695"
         }
      ],
      "firstName":"Kate",
      "familyName":"Bell",
      "id":"177C371E-701D-42F8-A03B-C61CA31627F6",
      "middleName":""
   },
   {
      "familyName":"Higgins",
      "middleName":"",
      "emails":[
         {
            "id":"74D6C349-2E03-45AC-98D8-279100B4926B",
            "type":"home",
            "value":"d-higgins@mac.com"
         }
      ],
      "phoneNumbers":[
         {
            "id":"E55D230F-DA04-407F-9604-0C0A72CE819A",
            "type":"home",
            "value":"555-478-7672"
         },
         {
            "id":"A34AD25F-24F5-4043-9BC6-060F2F43FCB8",
            "type":"mobile",
            "value":"(408) 555-5270"
         },
         {
            "id":"DB57AB88-73CB-4038-B38D-55D1680698AC",
            "type":"other",
            "value":"(408) 555-3514"
         }
      ],
      "firstName":"Daniel",
      "id":"AB211C5F-9EC9-429F-9466-B9382FF61035"
   },
   {
      "phoneNumbers":[
         {
            "id":"E297F1F7-CAFC-4A9D-ABF8-F79DB4496C87",
            "type":"mobile",
            "value":"888-555-5512"
         },
         {
            "id":"5E423897-5B64-4129-AF55-10B1B3153697",
            "type":"home",
            "value":"888-555-1212"
         }
      ],
      "emails":[
         {
            "id":"172726CF-4C0A-44C3-B9D8-0C86F7E654AD",
            "type":"work",
            "value":"John-Appleseed@mac.com"
         }
      ],
      "id":"410FE041-5C4E-48DA-B4DE-04C15EA3DBAC",
      "familyName":"Appleseed",
      "firstName":"John",
      "middleName":""
   },
   {
      "emails":[
         {
            "id":"FE3049D0-3EDF-44D0-A280-872B6751FDEE",
            "type":"home",
            "value":"anna-haro@mac.com"
         }
      ],
      "familyName":"Haro",
      "middleName":"",
      "id":"F57C8277-585D-4327-88A6-B5689FF69DFE",
      "phoneNumbers":[
         {
            "id":"8E126115-DA29-439E-8CBE-7F0BD06ED62B",
            "type":"home",
            "value":"555-522-8243"
         }
      ],
      "firstName":"Anna"
   },
   {
      "phoneNumbers":[
         {
            "id":"337A78CC-C90A-46AF-8D4B-6CC43251AD1A",
            "type":"work",
            "value":"(555) 766-4823"
         },
         {
            "id":"E998F7A3-CC3C-4CF1-BC21-A53682BC7C7A",
            "type":"other",
            "value":"(707) 555-1854"
         }
      ],
      "firstName":"Hank",
      "id":"2E73EE73-C03F-4D5F-B1E8-44E85A70F170",
      "familyName":"Zakroff",
      "middleName":"M.",
      "emails":[
         {
            "id":"42DD358B-05A9-4244-8EA3-E884A4DD8842",
            "type":"work",
            "value":"hank-zakroff@mac.com"
         }
      ]
   },
   {
      "id":"E94CD15C-7964-4A9B-8AC4-10D7CFB791FD",
      "familyName":"Taylor",
      "phoneNumbers":[
         {
            "id":"FE064E55-C246-45F0-9C48-822BF65B943F",
            "type":"home",
            "value":"555-610-6679"
         }
      ],
      "firstName":"David",
      "middleName":"",
      "emails":[
         
      ]
   }
]

@SailingSteve
Copy link
Member

This dialog is going to have a different aspect ratio and size on each device. So I'm going to postpone making a replica dialog like that for now.

IMG_3015

@SailingSteve
Copy link
Member

Simulator Screen Shot - iPhone 13 Pro Max - 2021-12-10 at 17 32 29
Simulator Screen Shot - iPhone 13 Pro Max - 2021-12-10 at 17 33 03
IMG_20C1D1D1C1ED-1
Simulator Screen Shot - iPhone 13 Pro Max - 2021-12-10 at 17 33 16

SailingSteve added a commit to SailingSteve/WebApp that referenced this issue Dec 11, 2021
Loads the contacts from the Apple Contacts API
Most of the look and feel, most of the navigation for wevote/issues/3301
@DaleMcGrew
Copy link
Member Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants