Share / Synchronize phone and/or email contacts



Contacts in QRCodes are encoded in a de facto standard called VCard that every QRCode application ( should ) use.
So you can share contacts even  for instance if you have an Android and the peer user owns an IPhone.

If mister A wants to share a contact with mister B .

Mister A have a QR code application that can display a QR code , for instance but not necessarily this application.
In case Mister A uses QR Code scanner , he navigates to the contact wallet and presses 'Contacts'
Then he switches to the printer icon ( which alternates with eye icon )  Once visible , he selects from the list
the contact he wishes to share , say 'Doe John'.

       
'Doe John' business card gets encoded by a QR code you see in the right corner picture , and he hands his phone to mister B.

Let's assume mister B also uses QR Code scanner . Now mister be takes a snapshot of the code picture.

       
After a press on the screen , and a successfull scan , the right hand side screen shows up , displaying the QR Code details.
Mister B clicks on '+' icon to add 'Doe john' to his contact list. A relevant name is given by default , it may be changed it mister B
wants it.

If now mister B navigates to his wallet and will see 'John Doe' in the contact list.



So far , soo good , but what's the point of all this without the possibility to actually write an email or make a phone call to 'Doe John'?
QR Code scanner is not ( and will never be ) an email or phone application just because you already have this installed on your phone.
So there is no point having redundancy with factory default applications , which are usually very mature. So QR Code Scanner
is intended to let you export / import contacts between your native Calendar / Email or Phone dialer application and another
phone , or you mail server account.

This is where synchronization comes into play.

There are basically 2 ways of  synchronizing contacts with other applications

Approch A:
----------------

  This approach is described for comparison purpose , it is not implemented by QR Code Scanner.

- You need at application install time to allow permanent contact read/write access to your Android phone contact database.
  Unless you uninstall the application ,  if you finally decide you want to revoque the right because you finally decide
  you are not interested in that feature anymore, you can't do it.

  Also you may have downloaded a different calendar application than the default one , and as there seem to be no no standard
  data API , you may have some interroperability issues between a QR code scanner and your brand new calendar application.

Approach B:
------------------

   This second approach is the one used by QR code scanner , and proposes a way to circumvents drawabacks exposed in 'Approach 'A''
   
  >>  It won't ask any permission  to read/write your Android phone contact database. <<

  Instead , it will ask a temporaray and very specific permission to you email provider, which you can easily revoke at any time.
  For the time beeing , 'Gmail ' from Google is the supported provider.
  QR Code scanner ' will synchronize with Gmail  , uploading new contacts scanned to the server , and  downloading contacts
  on the server into the wallet  so that you can share them with other users, as described in the present scenario.

  In order not to mess with contact update issue ( where is the last up to date? ) , QR code only deals with new contact.
  Said otherwise , the localy stored contact version will not override the server side version. That's normally constistent with
  a scanner usage, which imports new contacts.

  Performing synchronization is easy ,  you only have to press the double arrow button. Provided of course , you completed
  the permission setup , which has to be done once. Setup uses a standard security API ,called 'OAuth', which GMail implements.
  OAuth can be found in Facebook API as well , also on various Google services APIs.

  Now before explaining the permission process , one ultimate question : How does your email / phone application  finally get the contacts,
  once uploaded to Gmail? There are possibly 2 scenario ,  depending which Android mail application is on your phone .
  Some may synchroinze automatically with  your mail provider , so there is nothing to do. Alternatively , you can manually synchronize
  contacts in your phone . Its more or less a matter of pressing a synchronzation button somewhere in your phone 'Setup' application..

  For instance , on HTC wildfire ,  the process is the following:

 
               
 
Click on the 'Settings' green toothed wheel , them 'Accounts & Sync '.
You  can now press 'Sync All' , but its not that fast you you may click 'Google' and 'Sync Now'

Now , its time to explain how to setup permission so that QR Code scanner can talk with Gmail .
The first time you click on the 'contact' tab of your contact Wallet , in QR Code scanner , a web page will show up.
Actually you could even give the permission from you computer , in any web browser but you would then have then to copy
by hand a long and rather cryptic permission code back into your phone. That is why it has finally been decided to implement
the solution where you do it directlry from the phone.
The browser component used is an Android system component , QR Code scanner can't access your password, it will
just get back the code from the web browser component.


       

Remember , you don't have to do this every time youiuse the application on the handset. Its just an intial setup.
So say your have a itsme@gmail.com account , enter 'itsme' then your gmail password. This  will connect to the Google manager
which is a remote service and it will ask you a simple question : Do you want to grant 'QR Code Scanner Access' ?
Hopefully the answer is yes so click the blue button and wait untill it all disappear and comes back to the wallet screen.
Now the application has acquired the permission to read/ write contacts.

In case you want to remove the permission , you can connect there again , from anywhere ( your phone , a desktop computer )
and this time answer 'No Thanks' Permission is now revoked.