Share contact, html-input type - html

It is possible to share contact from my phone to html form (upload file), just like popular phone apps like whatsapp and etc do?
I really like how we upload images from phone, when we use <input accpet="images/*" type="file"> - it opens phone's gallery once I hit the input[type="file"].
I wonder if there is a same feature exists that opens contacts book.
I know that there are contact-files with VCF format (https://en.wikipedia.org/wiki/VCard). But can figure out if it is possible to use the format in accept field of input.

My guess is that you should use one of the next mime-types to provide users ability to upload VCards:
text/x-vcard
application/vcard (Macintosh only)
text/anytext
text/directory
application/x-versit (Eudora Plug-in)
text/x-versit (Eudora Plug-in)
text/x-vcalendar
Source.
Regarding direct access to contacts from mobile, this feature has a proposal status. Repo is https://github.com/WICG/contact-api. You can play with the feature here https://whatwebcando.today/contacts.html.
Hope these help!

Related

Whatsapp Click-to-Chat "Couldn't open link" Error Chrome Android/iPhone

I'm using Whatsapp Click-to-chat functionality, without a phone number. It previously worked but with the new Chrome version 76.0.3809.132, both on iOS and Android is not working anymore. On Android, it's showing a Toast with Couldn't open link. Tried contacting Whatsapp Support but no answer as of yet. With the latest update their own documentation example is not working, link to docs. Any suggestions or experiences?
Link example:
<a target="_blank" href="https://wa.me/?text=Villa%20stone%20road%20piece%2015%20meters%20from%20the%20asphalt%20street" title="Share on WhatsApp">
Error picture Imgur: picture
A table with my tested devices and versions on Imgur
If you use https://api.whatsapp.com/send instead of https://wa.me/ you don't need to specify a phone number.
e.g
https://api.whatsapp.com/send?text=Your%20Custom%20Text
It seems that chrome does not accept click to chat without a number specified. Once there's a number in the URL it works just fine.
Unfortunately I did not find a hack to get around it. Neither of this worked:
https://wa.me//?text=Hello%20World
https://wa.me/0/?text=Hello%20World
only if a proper number is specified it will open WhatsApp, but has the recipient already pre selected (the number we provide).
I tested it for a client about 2 weeks ago, when it still worked. So the last update of Chrome (from Aug 26) seems to be the problem...
The best is to use the custom url scheme format. Universal links do not work well with native clients
whatsapp://send/?phone=&text&source&data
It will work without phone number also.
My issue on a recent breaking-change: Universal links stopped working
There was a great blog post about the issue, however it is already outdated and proposes a php specific solution (nevertheless might gives you a good idea, how to think about the problem)
const text = "Hello..."
const phoneNumber = "23400000000000"
Linking.openURL(`whatsapp://send?text=${text}&phone=${phoneNumber}`)
First: Official Whatsapp Sharing Documentation. One of the following URLs is recommended for WEB use...
https://api.whatsapp.com/send?text=YourShareTextHere
https://api.whatsapp.com/send?text=YourShareTextHere&phone=123
And these for MOBILE use...
whatsapp://send?text=YourShareTextHere
whatsapp://send?text=YourShareTextHere&phone=123
If you are interested in watching a project that keeps track of these URLs, then check us out!: https://github.com/bradvin/social-share-urls#whatsapp

Link to chat whatsapp desktop

Is it possible to create link to chat for whatsapp on desktop and specify number
which doesn't exist in contact list?
whatsapp
This implementation works fine for mobile(doesn't matter number exists in your contact list or not), but for desktop in doesn't work if there are no such contact in your contact list and as a result I got a pop-up window with message 'Phone number shared via url is invalid'
yes, this is possible, but you need to :
Specify the text or/and link
For opening contact list, on zap, just set the content as text .
whatsapp://send?text=http://www.yoursite.com
Specify the zapzap telenumber for sending directly to contact .
whatsapp://send?phone=5531920095096&text=http://www.yoursite.com
You can also use the zapzap oficial page. This takes 2 steps :
https://api.whatsapp.com/send?phone=5531920095096&text=Hello
Remember that, all content on text variable must be a encoded string, and also that phone number have no spaces, or characters, also country code have not +
This is a nice feature, works very well. You can use (3) option and create a "goo.gl" url, and for options (1) and (2) you can trigger on a website, or app .
Actually, i'm trying to find some way to make whatsapp:// open in whatsapp desktop instead of asking for choose app from microsoft appstore, because now, its not opening it anymore, i dont know why, this used to work .
By the way, if you are a spammer .. don't even try anything, or we will catch you and all your fake numbers or profiles .
This is not for spamming. You have to use broadcast lists .
You can send the phone number so i can check if its correct, or, if you like, i can show you how this can be used, in our classifieds, included one buton for contact each seller, so users have an omnichannel experience .
Contacting advertisers from our site very fast, instead of saving, refreshing and contacting, can click and open zapzap chat .
If you have a website a customer service phone line, and a zapzap number, you are already a multi-channel business, so this is for seamless cross channel, so users can change from site to zapzap .
Remember that, best soluction for this issue is to use the API Page (3), and that you need to specify text variable all times, because IF you are going to send, you need to send something, and also, there is a "=" character after the phone number variable (at your example) that must be removed .
Please vote this up, because it took a long time to do .
Comment if you have anything to add .
Remember also that this is 2017-2018, and the zap implementation had started some months ago. Please whatsapp, let us opening whatsapp:// protocol from chrome to whatsapp desktop, it was working so nice .. please, it save us so much time, to start a conversation with a number not on contact list, and its working on mobile, just on desktop, that was nice, but since December update, its not running,.. whatsapp pleeeeeeeeeaseeeeee .
UPDATE: As i changed my phone number, i updated the post, because many people arround world contact me saying "thank you" or asking help on something .
Try this:
<body class="" onload="myWhatsappFunction()">
<a id="whatsapp-btn" class="" target="_blank"> Whatsapp</a>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mobile-detect/1.4.3/mobile-detect.min.js"></script>
<script>
var whatsapp_number = YOUR_PHONE_NUMBER_HERE;
function myWhatsappFunction() {
var md = new MobileDetect(window.navigator.userAgent);
if (md.mobile()) {
// mobile link
document.getElementById("whatsapp-btn").href = "https://wa.me/" + whatsapp_number;
} else {
// desktop link
document.getElementById("whatsapp-btn").href = "https://web.whatsapp.com/send?phone=" + whatsapp_number;
}
};
</script>
References:
https://faq.whatsapp.com/en/android/26000030
http://hgoebl.github.io/mobile-detect.js
https://cdnjs.com/libraries/mobile-detect
To create your own link to your whatsapp number with a pre-filled message that will automatically appear in the text field of a Whatsapp WEB-chat, you can use: (Dont work on Firefox web browser)
<a href="https://api.whatsapp.com/send?phone=yourwhatsappnumberwithcountrycode&text=hello"</a>
this API promises work on all browsers check it out:
https://www.forblink.com/
Try to use such link - https://wa.me/"number" where the "number" is a phone number in international format without + or - or dots.
So it must look like that: https://wa.me/89273546633
A possible cause of this error 'Phone number shared via URL is invalid' is that the phone number that you are trying to invoke is not on Whatsapp list, i.e. the number does not receive WhatsApp messages since it might not be registered on WhatsApp. I tried that using several of my phone numbers and the ones not on WhatsApp were throwing this error but those on WhatsApp worked. Guess will save someone from debugging.
I had the same problem in the past week, only links like wa.me/number were working fine on desktop for the past few years.
It seems that WhatsApp’s policy changed. I read advice about updating or accepting the privacy policy "which I don't" but all not correct. I tried different account on new installation and it didn't work.
It does not require the phone to be in your contact list, if you chatted with the number it will work. If there is no previous chat it stopped working a week ago.
A very simple solution. I added my country's area code (+44) in-front of the mobile number.
It works for both mobile and desktop.
Alternate solution
If you have specific numbers to send
You cane upload the numbers on Google contact
Same email I'd needs to be in mobile

URL for opening a link in a calendar application

This is a html link/href/url when you want to open a link with an email client (like outlook)
Send Mail
What should be an html link when you want to open the link with a calendar client (like calendar from microsoft outlook or similar calendar application) in order for them to also save some information regarding appointments/events?
Is there a general approach to these urls to be able to open with them different applications?
Thank you
There's no common link to be used across different calendars (Google, Outlook, etc...) you can work with some of those, but my suggestion is to use free "link builders" like http://addtocalendar.com or https://www.addevent.com for example.
I resolved this by creating below registry entry
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\outlookwebcal]
#="URL:Outlook Add Internet Calendar"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\outlookwebcal\shell]
#="open"
[HKEY_CLASSES_ROOT\outlookwebcal\shell\open]
[HKEY_CLASSES_ROOT\outlookwebcal\shell\open\command]
#="\"C:\\Program Files\\Microsoft Office\\root\\office16\\Outlook.exe\" /select outlook:calendar"
then markup should be like
<button id="outlookCalendarBtn" onclick="window.open('outlookwebcal:')">
Open Outlook Calendar
</button>

href whatsapp link to number

I'm having an issue trying to send Whatsapp messagges through browser using this code:
click
Using this code, Whatsapp opens correctly but the number is not recognized (i'm trying with my number, which is registered in Whatsapp) saying something like "You're trying to reach a non-Whatsapp number. Invite him or send SMS".
My international code (Italy) is +39.
I've tried 003912345, +3912345, 3912345, 12345, but with no success.
Anyone experienced this? Thanks for the help!
You get the message"You're trying to reach a non-Whatsapp number. Invite him or send SMS" because the number you want to use for sending the message to must be present into your phone contact list.
Anyway the attached code you use for the link won't work on iOS.
Try to use: href="whatsapp://send/?text=<>" data-action="share/whatsapp/share" . The link will open WhatsApp but you will have to manually select the consignee of the message from your contact list, otherwise you could use the ABID code to send the message directly to your contact.
Here you'll find more info about this technique: https://www.macstories.net/tutorials/use-whatsapps-url-scheme-with-drafts-launch-center-pro-or-a-bookmarklet/

To start Android Applications from website

I am a c# programmer that loves android phones knowing that I am never going to learn Java.
What I want to to is an ordinary website that starts the relevant applications from my android phone (Legend) with parameters like:
This works:
Mail - this opens the email klient with correct to=john#doe.com
href="tel:+4512345678" opens the phone with the correct digits on the screen
href="geo:something" opens google map and show you your location
This does not work:
href="sms:+4512345678, body=Hello You"
href="geo:+address" - I want to enten an adress I can navigate to...
Is the last ones possible do do or something like it?
Can you send me link or description
Help would be very appreciated
Thanks in advance
/Bo
Never say never. Java is pretty close to c#.
About your problem - check the WTAI specs.
call number
<a href="wtai://wp/mc;PHONE_NUMBER">
send sms:
<a href="sms:PHONE_NUMBER?body=MESSAGE_BODY">
open maps with given geopoint:
<a href="geopoint:latitude,longitude">
open gtalk:
<a href="gtalk:ACTION?jid=USERNAME&from_jid=YOURNAME">