Do anybody know how can I insert a contact to my phone just by scanning it's qr code? I mean is there any command or something which I can put before the contact detail while generating a qr code which will automatically add that contact to my phone?
Thanks in advance
Take a look at the vCard specification: RFC 2426
The data in the QR code needs to start with BEGIN:VCARD and prefixes such as FN, TEL and EMAIL are used to identify name, telephone, etc. And of course, whatever app you use to scan the bar code needs to handle vCards.
Example:
BEGIN:VCARD
FN:John Doe
TEL:888-555-1234
EMAIL;TYPE=INTERNET:johndoe#gmail.com
END:VCARD
Related
I am using the contact_service package for flutter to retrieve contacts from a device. But I noticed that when I look at the _contacts[index].phones it holds either mobile or other. I only take the contacts that have a mobiel phone number. But then when I look at the phonenumbers I see that they are all have a different format.
+31XXXXXXXX
+31 6 XXXXXXXX
06-XXXXXXXX
06 XXXXXXXX
6 XXXXXXXX
(045) XXXXXXXX
045 XXXXXXXX
Side Note: I am working on a android simulator with a google account
I would prefer to have them all with a country code so that I can compare them with my firebase auth phonenumber. So my question is what do I do?
Do I format the contact list phonenumber on the client side? Or do I just send it and use a cloud function to somehow figure it out? And how do I do that?
Do I format the contact list phonenumber on the client side?
Or do I just send it and use a cloud function to somehow figure it out?
Client side - a good idea. Especially given the fact that just a local phone number is not enough. You also need to guess the country. And that's easier on the client side where you have more context. It's also better for performance.
And how do I do that?
Probably, that's what you're looking for:
https://github.com/google/libphonenumber
https://pub.dev/packages/phone_number#-example-tab-
I would suggest the following:
Know what country your client is from.
Save the number as is with the name
Try to guess the country code through a process and save all versions
Do search using all versions
Trying to guess the correct number:
if it starts with + => it's good
else if it starts with 00 => replace 00 with +
else use the user's country code, in this case check if the contact name corresponds to other searched user
Or ask the user: do you know this person?
You can find countries key code here
I hope this helps,
Good luck.
I'm using the variables found on this page: https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#id08A6HI0J0VU
to try to pre-populate the form data for buyers when they purchase things on my site. The trouble is, some of the fields are getting filled in, while others are not. First name, last name, telephone number, and email address work without a problem.
However, the country is always set to the USA, and address1, address2, city, and zip are left blank. I'm sure my code is correct. I'm currently using the sandbox for testing. Has anyone else experienced this problem and can tell me what the solution is? Any help would be appreciated.
Make sure you pass over all the address fields. If you do not pass over one of the variables, the address will not be displayed. If this still does not work, can you provide an example of what you are sending over and list what is not getting displayed when you test this and I will look into it further. However, make sure you are passing over all of the address fields.
I have this account creation email that is sent out to anyone who is trying to create an account as I need to authenticate that they are who they say they are.
However, my issue here is that the URL where they need to click when they receive my email is too long and some email clients do not handle that very well and sometimes truncates the URL thus making the URL invalid when clicked.
Because the URL contains the domain name, the hashed email and a long activation code. It looks something like this.
http://domain.com/activation?email=75a5867d3df134bededbaf24ff17624d&key=8fecb20817b3847419bb3de39a609afe
While some email clients are ok with this but some are not...And I don't want to use HTML email and rather stick with plain/text email. Also I heard horrible stories using URL shorteners so I am not sure if I should use them...
Any insights in this area is appreciated!
I would definitely agree with Jason: shorten your url.
Think of what you really need.
Most likely the email address is in the database already, so you can refer to if with a short ID (let's say 7 numbers max). Your signature can be something very simple as substring (base64_url(md5(email+salt)), 0, 5). 5 base64 characters are 64^5=about 1 billion possibilities. This is probably secure enough (and what would the real damage be if someone registered with a wrong email address). So your url would be http://domain.com/activation?email=1234&key=aD5Y_, http://domain.com/activation?e=1234&k=aD5Y_ or even http://domain.com/activation?e=1234aD5Y_ . In the last format you know the last 5 characters are the key, so the rest is the id. Note that the code example assumes md5 to return in an 8-bit string format (and not hex string format), and base64_url uses a url safe base64 method. Also, some background info on a salt.
If your email address has a long id or needs to be encoded in the url as well, or the above is not short enough yet, consider an even shorter form. Basically this will result in making your own url shortener. Just before you insert the link into the email, generate some random 5 character string. Insert this string as key into memcached (or the database), with as value the original url. Then your url could be http://domain.com/redirect?key=rT-tW . When you see this in your app, just retrieve the original url from the database/memcached and redirect there.
Do make sure that your system is robust against the following:
Someone enters an email address (their real email), you send the link
That person changes their email address into something fake on the website before clicking the link, you send a new email to the new (fake) email address
They now click the link from the first email and your website confirms their email address in the second (fake) form.
One way to do this is make sure to use the email address itself (and not for instance just the user id) in the key generation, as suggested above.
I need implement a Data entry like receiver field in mail app (Ex. To: pinco#gmail.com).
In particular in mail app each receiver is added and circle in blue color. This is my objective.
Can you help me?
Yes, here's a great library written by a friend that does exactly what you want:
Multi Recipient Picker Control
Is there a mechanism where I can identify a string in an email, say a order number, and have it route to my iPhone application? I know that base types do this, but not sure if I can create a new type for my app.
Thanks!
You can add a custom URL type through your app (say orderNum://)
Then, if you include a link in the email, say orderNum://1234567890
if the user clicks it, it will open your app, and you will be able to get the data it sent you.
See the LaunchMe example: https://developer.apple.com/library/archive/samplecode/LaunchMe/Introduction/Intro.html