Android offline speech recognition without a pop up dialog - android

I have followed this stackoverflow post and created an activity. Now on click of a button I start speech recognition but it returns with error "ERROR_SERVER" as soon as I click on the button, It simply does not listen. It does not make any difference if I am connected to internet or not.
I have researched a lot but there is no proper documentation about the error codes nor any approach to resolve these errors. Hope someone can help me out here!

I was able to figure out the issue on my own, so thanks but no thanks to the person down voting.
Note for people struggling with a similar issue, it is device dependent; may occur some devices or may not on others.
Please check the device voice input is set to Google or Basic Google recognition and not Enhanced Google Services. This seems to create issues on some devices.

Related

How to discover devices like Firetv, Airplay, Chromecast, Roku on a local network within a Flutter app?

it's my first post here. Happy to be a part of a healthy community.
So I am working on a Flutter project which requires me to fire up discovery for devices such as FireTV, Chromecast, Roku, Airplay, Samsung on the tap of a single cast button, and then play media on the selected one.
Now I have spent days behind the research before posting it here.
I have come across this discussion on GitHub -> https://github.com/flutter/flutter/issues/18212
Also, the TLDR would be this link -> https://github.com/terrabythia/flutter_chromecast_example
Using this already for FireTV -> https://pub.dev/packages/flutter_fling
I have got FireTV nicely working even the media controls and tested, the problem starts with how do I join them all to be fired up in a single call, and yet get generic data back. Throughout my research, I have been bombarded with words like mDNS and Cast SDK's receiver. Also being new to network discovery, I am finding it difficult to get a proper direction. I am open to working on native solutions and maybe even building a plugin, but since this project has time constraints, I am really looking for ways I can implement this on an MVP level.
What I am looking for is how should one be going about to solve this kind of problem, or building a solution and get it working. Any help is highly appreciated, thanks.

Can an android application be open when another app open?

I want to create an app can help me control my Facebook addiction and waste time on my phone. So I want to create an android application start when I open an app like Facebook or Twitter , when I open Facebook, my app will start timing and tell me after a time that I setting in it. Can I do that, or should I run my app on the background. I'm new to android so I don't know where to find information or keyword to research.
Sorry for my bad English.
Hey there is no direct way of doing it, but you have to figure out the solution for that by running a service and accessing stats
refer this thread for detail
this thread
this particular latest answer on that
latest answer
you may have to figure out a solution for that and its possible, many apps are doing it.
upvoted your question, because i liked the question and idea. Please post back the best solution you implement, so that someone in the future might benefit of it and the i guess few of the solutions given are already outdated now.

Is it possible to open Android Google Map voice search?

I would like to open this directly from my program, is it possbile?
I checked this, but cannot found relevant information
https://developers.google.com/maps/documentation/android-api/intents
If it is impossible, is there any alternative way?
You can't do that from your activity.
In the image above you can see a dialog that catches the voice of the user, this is because Google Maps calling an intent ACTION_RECOGNIZE_SPEECH, and you can't start an intent and after calling Maps.
Here is the only documentation that I found on the internet for that question. The Adding Voice Capabilities. Just remember that these voice actions are task-based and are built into the Wear platform. So you need to use Android wear for that, see Maps API on Android wear.
Just read the two documentation to understand more. Also take note, that do not violate any terms of service on the Google Maps. Here is one example question for that.
So far, I have not used this voice capablities, so I'm not sure if it will really help you, but I think I give you a small idea with it. Goodluck and Happy coding :)

How to check wether Speech Recognition is Available or not?

When I am initializing a Speech recognition app, I use this line of code:
Boolean b=SpeechRecognizer.isRecognitionAvailable(cContext);
Why does b always equals false on some devices (the emulator for example)?
I understand what the function does from its description on Android documentation, but the documentation does not say what to do to make voice recognition available.
Do I have to setup something else on my emulator?
Do you know how to make Speech recognition always available?
The problem IS real, so don't downvote before knowing. I solved it myself. The ultimate solution is to verify programmatically, that Google Search app is INSTALLED and ENABLED. If not, the best practice is to use intents to take the user to the Play Store for download/update, or to the App Info screen within settings to enable it. I did it, and it worked, if you need the code just let me know.

Seek for help about Android Programming

I want to know how to control system resources and services like bluetooth, SMS, phone contacts etc.
Honestly, i want to know how or what to do to control sms usage based on user behavior, block incoming call or change it to auto vibrate mode without user noticed like that.
Actually, I want it for my assignment about context aware access control paper.
I choose Android for implementation but i am afraid i
couldn't submit my paper in time if i study android from the beginning and all by myself.
No offense but I want to avoid errors.
I feel my head becomes swollen whenever "force close error" show as I need it urgent.
As Willytete said developer site is the best one for you
There you can find
Application Fundamentals
Download the Android SDK and start programing
The first program tutorial where you can start Hello World
Notepad Tutorial where it give you a lot of ideas
List of Sample Apps, where there is a lot of codes
Getting the Samples, it explain how to use this.
You will get all the information from developer site that you needed, while move from beginner to an expert

Categories

Resources