I have developed an application to enable blind users to make a call using number option. in that after number entry is done it need to be spoken to the user then only making call should be done. Can someone suggest me the ways to synchronize between the tts system and calling a new intent to make call.How to accomplish the same thing if need to ask for user confirmation as well.
If i want to enable the blind to make a call through contacts in mobile, what would be the better approach to do it.through speech recognition or any other ways are available.
Related
I'm able to integrate Android widgets with Google Assistant. And want to have some voice command experience.
For example the CREATE_CALL intent, if user is trying to call Alice by saying call Alice with some app, and if there are 2 Alice in my app, is it possible for me to response with a widget showing 2 Alice, and asking user by voice, and user can choose which one to actually call, all by voice? Can it be done by SpeechRecognizer API?
Broadly speaking, App Actions do not have a voice conversation experience. There are some tricks you can pull that might head in that direction, but they are largely outside of the App Action Widget experience itself.
Can I respond with a widget showing that there are multiple matches?
Yes, you can send back a Control Widget that might allow them to choose which user they mean.
Can they speak which user?
Probably not in the way you're thinking. To use your example, they can re-invoke the CREATE_CALL BII using any of the phrases, but you can't prompt them with "Who did you mean, exactly?" and for them to just say the name.
Can I use the SpeechRecognizer API?
Not as part of a widget.
Widgets get embedded in the conversation with the Assistant.
In theory (and this is on my list to eventually test and figure out), you should be able to deep link to an Android Intent in cases such as this and open a view. While there, you could use SpeechRecognizer or just open the microphone to send audio somewhere. But this isn't done using the Widget itself.
In this scenario, SpeechRecognizer just does the Speech To Text (STT) or Automatic Speech Recognition (ASR) part of the processing. To actually match this up to phrases to determine an Intent, you would need a Natural Language Understanding (NLU) module such as Dialogflow. (But you may not need the SpeechRecognizer in that particular case, since Dialogflow can also take an audio stream to do the ASR part for you.)
I don't want my app to control and execute some tasks on users phone, like setting alarm or calling someone. I have found many tutorials that focused on accomplishing this. I want to collect data using the speech recognizer API that goes to an online server, and later can be requested by multiple users.
For example:
"OK Google! find the nearby hospitals for me", I don't want this.
"Facebook was founded by Mark Zuckerberg in 2004", I want this.
The text data (collected from the recognition api) would hardly be 500 characters long and because the speech to text technology can make mistakes, I will allow the users to do the final check and make necessary changes by typing. Is Android's speech recognition suited for this kind of application? Or should I go for Google cloud APIs? I want to go with the former because it's completely free (No?). I want the recognition to be as accurate as possible and that's why I don't wanna leave Google's APIs.
You can invoke the speech recognizer Activity on Android using the Intent
new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
and receive the recognized text as result.
See details at https://developer.android.com/training/wearables/apps/voice.html
My team is developing an Android app that includes the ability to call and talk to customer support. We are calling an Intent with ACTION_DIAL, which brings up the dialer with the phone number pre-populated, as expected. In the device emulator, we also see links to Create a new Contact and Add to a Contact, which are fine, but we want to suppress the Send SMS link, since there is no way for us to read messages sent to that number. Ideally, I'd like to be able to pass a parameter or change a setting that disables SMS messaging for that one invocation, but I'm open to other solutions. Searches that I've done haven't turned up anything.
Thanks in advance,
Dan
No. There's no way of knowing what dialer is being launched for action dial- OEMs all have the option of using their own, or the user can even download one of their own. There's no way of knowing what options those dialers support, and definitely no way of configuring them. Even if there was, a dialer app could ignore the configuration. You may want to use ACTION_CALL instead, which requires additional permissions but will directly call without bringing up a prefilled dialer.
For start I must say that I´m new to Android.
I´m a Msc Student and for my Msc thesis I've to develop a system that collects all user inputs on the touchscreen, regardless of the applications that are being used, and it must be done in background.
The objective is to use that data to establish a user profile and then apply an algorithm that continuously compare the new inputs with that old ones to grant the legitimate user authentication.
In other words I've to develop a touchlogger, but not for malicious purposes.
My question is: Are the initial permissions, that a user accepts in the installation process, enough to allow my app to collect the touch inputs from other applications, or it will be blocked because of the sandbox?
Note: The system is to be used for a regular person in a regular device, so rooting the device must not be an option.
Thanks for your help.
Best Regards
This is not possible, especially in newer versions of Android.
This is because even though there are system overlays allow you to display things like chat heads over any other app, you cannot capture touch events and pass them down to the app below. So even if you manage to capture the events, you will end up rendering the device useless, as nothing below your layover will work.
I'm trying to get an idea of what's possible and what isn't in terms of using a custom dialler app for internet calls.
The idea is that the standard Android dialler be used when no internet connection is available, but use a custom-written VOIP dialler / caller app whenever an internet connection is available.
I see that in the Android call settings you can set it to use Internet calling whenever a connection is available. How does this work? Does this simply tell the native dialler app to use internet calling, or is there actually a specific Intent or something that gets fired when an internet call is made so that I can open my custom SIP app?
And also, is the 'standard phone app' icon always linked to the standard phone app, or can you override this phone icon to open your custom VOIP app when a connection is present?
So basically, is there a way to seamlessly and automatically switch between the standard dialler and the custom SIP dialler based on whether or not the phone is connected to the internet?
If not, is this something that could be done by customizing Android?
Thanks,
There are four possible ways of doing what you want that I know of:
1. Replace the Android Dialer
This is hard and a lot of work. The Android Dialer (last time I checked anyway) WAS the telephony stack in Android. So to replace it you have to replace the complete telephony stack (including any public API) i.e. handle all cellular (and now sip) calls in and out of the device. Also the only way to replace it is to root the device as it can't be replaced normally.
2. Provide your own Dialer that is separate to the main dialer.
This has it's advantages that you will never get into "trouble" with anything else.
3. Hook into the outbound call API (ACTION_NEW_OUTGOING_CALL)
This is something that is pretty cool and I haven't seen any other OS allow you to do. Basically you can trap when either the normal dialer starts to dial a number (or when another application starts to dial a number as well) and you can either allow it through, modify it or cancel it. Behavior I've seen from sip clients is that they will cancel the call and put up a selection screen prompting where you want to send the call (sip, cellular or something else).
Here is an example of it's use.
The downsides are:
You can be fighting with other applications to which gets first go. There is a 'priority' setup, but all I've seen is everybody wants to be number one.
On some Android devices where the OEM providers that own Dialer, they don't always fire it!!!
4. Detect when the dialer is shown and show your own dialer in front of it.
This works and does allow you to provide a nicer more integrated feel as you can provide call type selection within the dialer, as well as other custom number lookups but that can be a little tricky to do on some devices.
I would suggest 3 to begin with as it's pretty easy to do and you can get something up going pretty fast. In code that I have worked on, we have done 2, 3 and 4 and also looked into 1.