I would like to know which are my posibilities as a developer to implements a send message voice action, in a messaging app (like a custom Telegram app), for spanish users. I want to implement the send new message action, I does not interested in replying to received messages (this is already implemented).
This is an example of I want to implements:
Create Message action
The user tells an utterance like "I would like to send a message with whatsapp".
A widget asks for a contact to send the message (if the user did not especificated one).
The app sends the message.
This is the same working example for spanish language: Create Message action (spanish)
I already know that there are built-in intents but the CREATE_MESSAGE built-in intent is only available for en-us locale. I also checked the custom intents but there are also only availables for en-us locale as I know. Which more options do I have?
PD: My final goal is to make the app compatible for Android Auto so I'm making it compatible with google assistant first.
Thanks in advance.
As you note, the actions.intent.CREATE_MESSAGE BII is only available in en-US right now. This is probably the best one, since it provides getting and sending a message without any additional work.
You may want to see if actions.intent.OPEN_APP_FEATURE will work for your needs. It has the downside that it does not have the fields available in CREATE_MESSAGE, but it might be a useful way to open the app.
However...
If you're planning on targeting Android Auto, that platform is even more restricted. If you're building an Android Auto app, you are limited to use only the actions.intent.GET_PARKING_FACILITY or actions.intent.GET_CHARGING_STATIONS BIIs. If you are willing to have it return a widget, you get a little more flexibility in what BIIs it accepts, but these don't let you send a message or open the app (even in en-US).
I am new to react-native.I am trying to build a simple android application that reads all the messages from the inbox and display it in a listview. In android,i can read all the messages using URI.
How can i read all the messages in a similar way using react-native?
Thanks in advance
In React native,you want to read sms from android phone:
react-native-get-sms-android
This module that supports interaction with the Messaging API on Android
The package allows you to:
• get messages
• send messages
• delete messages
Refer this for this module integration:react-native-get-sms-android
Make sure that you need specific permissions to read SMS for android.
For checking permissions in android,use PermissionsAndroid API.It provides access to Android M's new permissions model.For more details check this docs
react-native-android-sms-listener
To listen for the new messages in your app use this library.This library allows you to listen for incoming SMS messages.
Refer this for this module integration:react-native-android-sms-listener
Remember that everything that you did in Android, you can still do it in react Native, writing a Native Module, and here is a well explained example of how to do that https://facebook.github.io/react-native/docs/native-modules-android
Or I saw that there is this external library https://github.com/briankabiro/react-native-get-sms-android, that you might try.
Hi guys I need help from you all in Android mobile number verification process. I have a android phone I just need to verify the otp but in this case they using the auto verification method is it possible to verify my otp through fwd the msg or by using prank message app Pls anyone help me to solve my problem and thx in advance...
Assuming that you are asking for "how to implement OTP verification". There are number of ways to tackle this. Please look at the below link for two ways of achieving this using Google authenticator or using a SMS gateway.
Android one time password (OTP)
here is the tutorial to read the incoming messages using Broadcast receiver if you are going to use the second method.
"Reading incoming messages using broadcast receiver."
I believe you are trying to implement a way you can implement your own TTS (Text-To-Speech) Verification system that prompts the user to enter in the code.
If so, you can use Nexmo's Text To Speech Prompt.
All you have to do is make an HTTP call (For example: https://api.nexmo.com/tts-prompt/json)
From here you can use the parameters you want such as,
text - Body of the text message to be read to the end user
machine_detection - How to react when an answering machine is detected
lg - To determine what language the text is read in
bye_text - Body of the text message played after digits are entered successfully
failed_text - Body of the text message played after 3 failed attempts
There are many other parameters you can work with and customize your TTS prompt to capture/confirm data.
Full disclosure, I work at Nexmo
You can see more information how to implement this here
Can we receive the voice command converted as a string in Android Wear? Or do we get the array of microphone amplitude values?
You will get an extra reply string with the reply intent. Here is a nice short video explaining this.
You can also look at the ElizaChat sample which does that
The Android Wear system delivers your app on the handheld the message as a string extra in the Intent you specified to be used for the action.
This link is very useful: LINK
Also, the link posted by #beworker: LINK
I am answering to my question as it might be useful for others in the near future. Because, now we are entering the era of wearable computing! :)
I have developed a website which is mainly used in mobile phones.
I want to allow users to share information directly from the web page into WhatsApp.
Using UserAgent detection I can distinguish between Android and iOS.
I was able to discover that in order to implement the above in iOS I can use the URL:
href="whatsapp://send?text=http://www.example.com"
I'm still looking for the solution to be used when the OS is Android (as the above doesn't work).
I guess it is somehow related to using "intent" in Android, but I couldn't figure out how to do it as parameter for href.
Just saw it on a website and seems to work on latest Android with latest chrome and whatsapp now too! Give the link a new shot!
Share via Whatsapp
Rechecked it today (17th April 2015):
Works for me on iOS 8 (iPhone 6, latest versions) Android 5 (Nexus 5, latest versions).
It also works on Windows Phone.
The above answers are bit outdated. Although those method work, but by using below method, you can share any text to a predefined number. The below method works for android, WhatsApp web, IOS etc.
You just need to use this format:
UPDATE-- Use this from now(Nov-2018)
Use: https://wa.me/15551234567
Don't use: https://wa.me/+001-(555)1234567
To create your own link with a pre-filled message that will
automatically appear in the text field of a chat, use
https://wa.me/whatsappphonenumber/?text=urlencodedtext where
whatsappphonenumber is a full phone number in international format and
URL-encodedtext is the URL-encoded pre-filled message.
Example:https://wa.me/15551234567?text=I'm%20interested%20in%20your%20car%20for%20sale
To create a link with just a pre-filled message, use
https://wa.me/?text=urlencodedtext
Example:https://wa.me/?text=I'm%20inquiring%20about%20the%20apartment%20listing
After clicking on the link, you will be shown a list of contacts you
can send your message to.
For more information, see https://www.whatsapp.com/faq/en/general/26000030
Currently, it's very easy to achieve this. You only need to add the following code to your pages:
Share via Whatsapp
And that's it. No Javascript needed, nothing else needed. Of course you can style it as you want and include a nice Whatsapp icon.
I tested this in my Android device with Google Chrome. The versions:
Android 4.1.2 (Jelly Bean)
Chrome Mobile 37.0.2062.117. Also tested on Firefox Mobile 31.0.
Whatsapp V 2.11.399
It also works on iOS. I've made a quick test on an iPhone 5 with Safari and it works as well.
Hope this helps someone. :-)
According to the new documentation, the link is now:
Share this
If it doesn't work, try this one :
Share this
The official docs say to use: wa.me. Don't use wa.me. I apologize for the length of these results, but it's been a rapidly-evolving issue....
April, 2020 Results
Share Link
This link is incorrect. Close this window and try a different link.
May, 2020 Results
Share Link GitHub Ticket: WhatsApp short link without phone number not working anymore
We couldn't find the page you were looking for
Looks like you're looking for a page that doesn't exist. Or a page we might have just deleted. Either way, go back or be sure to check the url, your spelling and try again.
August, 2020 Results
Share Link
Works as expected!
LATEST - October, 2020 Results
Share Link
(Broken again!) og:image tag previews are disabled when using wa.me.
Based on some of the comments I'm seeing, it seems like this still be an intermittent problem, so, going forward, I recommend you stick to the api.whatsapp.com URL!
If you want to share, you must absolutely use one of the two following URL formats:
https://api.whatsapp.com/send?text=YourShareTextHere
https://api.whatsapp.com/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
Recently WhatsApp updated on its official website that we need to use
this HTML tag in order to make it shareable to mobile sites:
Hello, world!
You can replace text= to have your link or any text content
LATEST UPDATE
Now you can use the latest API from whatsapp https://wa.me/ without worrying about the user agent, the API will do the user agent handling.
Share pre-filled text with contact selection option in respective whatsapp client (Android / iOS / Webapp):
https://wa.me/?text=urlencodedtext
Open Chat Dialog for a particular whatsapp user in respective whatsapp client (Android / iOS / Webapp):
https://wa.me/whatsappphonenumber
Share pre-filled text with a particular user (Combine above two):
https://wa.me/whatsappphonenumber/?text=urlencodedtext
Note : whatsappphonenumber should be full phone number in international format. Omit any zeroes, brackets or dashes when adding the phone number in international format.
For official documentation visit https://faq.whatsapp.com/en/general/26000030
I'm afraid that WhatsApp for Android does not currently support to be called from a web browser.
I had the same requirement for my current project, and since I couldn't find any proper information I ended up downloading the APK file.
In Android, if an application wants to be called from a web browser, it needs to define an Activity with the category android.intent.category.BROWSABLE.
You can find more information about this here: https://developers.google.com/chrome/mobile/docs/intents
If you take a look to the WhatsApp AndroidManifest.xml file, the only Activiy with category BROWSABLE is this one:
<activity android:name="com.whatsapp.Conversation" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:windowSoftInputMode="stateUnchanged">
<intent-filter>
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
</intent-filter>
</activity>
I've been playing with it for a while, and I couldn't make it to work. The most I got was to open the WhatsApp application from Chrome, but I couldn't figure out a way to set the message content and recipient.
Since it is not documented by the WhatsApp team, I think this is still work in progress. It looks like in the future WhatsApp will handle SMS too.
The only way to get more information is by reaching the WhatsApp dev team, what I tried, but I'm still waiting for a response.
Regards!
In general it makes sense only to display the Whatsapp Link on iOS or Android Devices only, using java script:
if (navigator.userAgent.match(/iPhone|Android/i)) {
document.write('Share on WhatApp');
}
Just tested the whatsapp:// scheme on my super old Android 2.3.3 with Whats App 2.11.301, works like a charm. It seems to be just the Whats App version. Since Whats App is forcing everyone to update, it should be safe to use it.
The Whats App documentation also mention that scheme: http://www.whatsapp.com/faq/en/android/28000012
I'm using this on a production site now and will update here, if I get any user complaints.
Edit (Nov 14): No user complaints after a couple of weeks.
Switch the whatsapp share links according to the platform whether desktop or mobile.
This works with or without providing the phone number in the link.
For Mobile
vm.LinkTextToShare = 'https://api.whatsapp.com/send?text=' + encodeURIComponent(window.location.href) ;
window.open(vm.LinkTextToShare,"_blank");
For Desktop
vm.LinkTextToShare = 'https://web.whatsapp.com/send?l=en&text=' + encodeURIComponent(window.location.href) ;
window.open(vm.LinkTextToShare,"_blank");
This code worked for me.
After clicking on the link, it will ask you to choose the contact to share a message.
Click here to share on Whatsapp
You can add target="_blank" attribute to open it in a new window or tab.
I don't think the phone number is needed when someone wants to share a particular message or article.
use it like "whatsapp://send?text=" + encodeURIComponent(your text goes here), it will definitely work.
This is correct if you want to open whatsapp in browser:
<a href=`https://web.whatsapp.com/send?text=${yout URL or TEXT}` ><Whatsapp</a>
Try to make it this way:
Link
Even you can send messages without enter the phone number in the link:
Say hello
After clicking on the link, you will be shown a list of contacts you can send your message to.
More info in https://faq.whatsapp.com/en/general/26000030.
Good luck!
Use: https://wa.me/1XXXXXXXXXX
Don't use: https://wa.me/+001-(XXX)XXXXXXX
The pre-filled message will automatically appear in the text field of a chat. Use https://wa.me/whatsappphonenumber?text=urlencodedtext where whatsappphonenumber is a full phone number in international format and urlencodedtext is the URL-encoded pre-filled message.
Example:
https://wa.me/1XXXXXXXXXX?text=I'm%20interested%20in%20your%20car%20for%20sale
To create a link with just a pre-filled message, use https://wa.me/?text=urlencodedtext
Example:
https://wa.me/?text=I'm%20inquiring%20about%20the%20apartment%20listing`
After clicking on the link, you’ll be shown a list of contacts you can send your message to.