Save the contact, email, and phone when clicking on a link

1

I wanted to know if this is possible because I have a client who wanted to do this, I believe it is not. As the title says, I need to click on an image (this on the cell phone, of course) it saves or at least go to the part of the cell phone contact record.

Has anyone seen anything like this? Do you know if you can?

I know what you can do with the phone call:

<a href="tel:110000000">Telefone</a>
    
asked by anonymous 16.05.2018 / 22:21

1 answer

1

Unable , HTML5 and JavaScript APIs do not allow such interaction, it would be nice if there were a window that opened asking if the user would like to save, but there is no such functionality.

In iOS (iPhone) if you hold the touch on the link gives the option Add Contacts :

IbelievethatHTMLcanbeasmuchaspossible,however,soVcardcanhelpifyoucreateadocumentwiththeextension.vcf(andthehttpserverissetupwithcorrectContent-Type),oryoucansettheheaderofascriptdynamicserver-side(likephp)Content-Type:text/vcard,withaformatsimilartothis:

BEGIN:VCARDVERSION:3.0N:Doe;John;;;FN:JohnDoeORG:Example.comInc.;TITLE:ImaginarytestpersonEMAIL;type=INTERNET;type=WORK;type=pref:[email protected];type=WORK;type=pref:+16175551212TEL;type=WORK:+1(617)555-1234TEL;type=CELL:+17815551212TEL;type=HOME:+12025551212item1.ADR;type=WORK:;;2EnterpriseAvenue;Worktown;NY;01111;USAitem1.X-ABADR:usitem2.ADR;type=HOME;type=pref:;;3AcaciaAvenue;Hoemtown;MA;02222;USAitem2.X-ABADR:usNOTE:JohnDoehasalongandvariedhistory\,beingdocumentedonmorepolicefilesthatanyoneelse.Reportsofhisdeatharealasnumerous.item3.URL;type=pref:http\://www.example/com/doeitem3.X-ABLabel:_$!<HomePage>!$_item4.URL:http\://www.example.com/Joe/foaf.dfitem4.X-ABLabel:FOAFitem5.X-ABRELATEDNAMES;type=pref:JaneDoeitem5.X-ABLabel:_$!<Friend>!$_CATEGORIES:Work,TestgroupX-ABUID:5AD380FD-B2DE-4261-BA99-DE1D1DB52FBE\:ABPersonEND:VCARD

Openingonyourphoneislikelytoseeascreensimilartothis:

Thentheuserwillnoticethe"Open in Contacts" (in mobile phones in Portuguese the text will be in Portuguese, do not worry)

Source: link

    
18.05.2018 / 03:39