I have implemented Android Speech Recognition as a service on Android 4.1 & 4.2 recognition solution in my application.
Everything is fine until Android 4.2 OS version, but above the recognition doesn't work. I tested my solution on Kitkat and Lollipop.
The service starts run 2-3 times(i can see the log in the handler), then stops without any error. Here they mentioned about a similar problem, but no solution.
I refreshed Google Play Services to 7.5, but not that is the source of the problem.
Any suggestion is appreciated!
Update:
The suggested solution, to observe if the service runs, just a partial solution, i can restart listen the recognizer with startListening method, but it's not listening at all. I'm considering to use other recognition service, like sphinx. It is so embarrasing, when OS version changes and your app will be wrecked...
I'm aware about the fact, this API is not intended to be used for continuous recognition - as mentioned in documentation.
Related
I am very new to Android development, and recently I've been working on a project for college using an Android phone that, in sum, is constantly listening for the user's voice until they say a specific word or phrase, and then it executes an action. It has to listen the user even when the phone is locked. As for now, battery consumption is not a concern.
My issue is I have no idea how to run this on background. I've read about Services, WorkManager and JobScheduler, none of which seems to continuously run speech recognition while the phone is locked. I found similiar questions from several years ago but no definitive answer.
Is there any way to do this?
Similar questions:
Speech Recognition as a service.(Android)
Android Speech Recognition as a service on Android 4.1 & 4.2
Android Speech Recognition Continuous Service
I was working on call recording with nougat but since oréo, it's not working anymore.
I am using MediaRecorder for recording.It is working on other versions of android.
I've tried many others, but no success.
so i need to know if someone has been successful made this type of application with Oreo, if so, how to do this?
Call recording is not allowed from Android 6 Marshmallow.
There was a workaround in native code around the root requirement, which worked until Android 8.1.
This was patched in Android 9 Pie, and since this version recording calls is not possible anymore. You can find a detailed explanation from the developer of ACR (the most popular call recorder for Android) here.
For the Android 6-7-8 workaround, you can check an example implementation here (it basically uses native C++ code to bypass the check done in Java).
I implemented a background service Speech recognition in my application. It stops working after a few seconds (In Pixcel and Nexus devices) due to Oreo OS does not support the background services. This service is the main feature of the application. It should continue running in Android OS 8 too. Please provide me a solution for it.
This link will explain about the back ground services restriction in Oreo 8 android os: https://developer.android.com/about/versions/oreo/background.html#migration
You can check on this article : Keep those background Services working when targeting Android Oreo
"The JobIntentService works in the same way as a Service however it
enqueues the work into the JobScheduler on compatible Android targets.
This means you can easily convert your Services and IntentServices
into a JobIntentService and keep the same functionality."
And it will handle older Android versions compatibility automatically : Here
"When running on Android O or later, the work will be dispatched as a
job via JobScheduler.enqueue. When running on older versions of the
platform, it will use Context.startService."
I have developed a Ionic app that uses Android Speech Recognition API via a Cordova plug-in. It worked fine a few days back, but one day it stopped working. I did not change any source code. Sometimes it immediately returns me an error: ERROR_NO_MATCH. Sometimes it worked for one second, gave me one or two words and stopped listening abruptly, regardless that I was still talking to it.
I reflected what has happened in recent days that may have caused problem.
Changes to Google speech recognition server? It is not likely. I did not
find anything about it from the web. But a weird thing is: I installed some other simple voice-to-text apps, they all seem to terminate listening prematurely.
Changes to my computer? I have re-imaged my hard drive and reinstalled everything.
Changes to my mobile phone? Maybe some auto update has affected the voice recognition part.
Anyone has the same problem? Any help is appreciated.
Edit 08/09/2016
What I have tried:
Factory reset of my mobile phone
Building the app with different Android API levels
Uninstalling all updates to Google App, and disabling it
However, none worked.
https://github.com/esnyder/callrecorder
I've applied this source code to perform call recording but It's not recording call (Two Way Recording).
After searching a lot I've got android have banned call recording service after version 4.1. But there is an CallRecorder App on google play which is working fine in my mobile too.
How can I perform call recording feature in my app?
AudioSource.VOICE_CALL not working in android 4.0 but working in android 2.3
posting late on thread but still Check this link hope it will help
https://play.google.com/store/apps/details?id=com.rivalogic.android.callrecorder&hl=en