Speech Recognizer on HTC One M7 - java

I wrote a speech recognition app using android's built-in speech recognition classes. The following exception shows up in my developer console when the startListening function is called on the speech recognizer object obtained using createSpeechRecognizer(context) function.
SecurityException:
java.lang.SecurityException: Not allowed to bind to service Intent
{ act=android.speech.RecognitionService
cmp=com.htc.android.voicedictation/.VoiceDictationService
}
Any ideas why this is happening and how to fix this?
Tested working on Nexus 7 & HTC ONE X.
Failed on HTC ONE M7 (4.2.2)

Found the root cause of this issue from this link: https://groups.google.com/forum/#!topic/joaomgcd/qcSfL2-SIfk
Solution: Google voice typing must be enabled on a device.
Steps to enable Google voice typing on HTC One device:
http://eguides.sprint.com/support/eguides/htconem8/index.html#htc_one_m8_ug/keyboard_and_input_methods_google_voice_typing.html

I have faced the same issue. I solved it by Going to Settings-> Language & keyboard -> Voice Input-> Then enable the 'Basic Google recognition', as this radio button was disabled in my same HTC phone.

Related

How to fix the "raw_depth_java" immediate crash after showing "This device does not support the ARCore Raw Depth API."?

Hey everyone!
I am trying to set up the ARCore demo application "raw_depth_java" in Android Studio using an emulator, but it closes immediately every time I open it. For reference:
The emulator I am using: Android 10.0 Google Play | x86
What I want to happen: I want to open the demo application and see ARCore.
What is happening: The emulator sends the message, "This device does not support the ARCore Raw Depth API." The app immediately closes after.
Other relevant information: I have installed "Google Play Services for AR."
Question (TLDR): How can I run the "raw_depth_java" application in an emulator?
Thank you for your help, have a wonderful day :D
The emulator can't run the ARCore Depth API.
From: https://developers.google.com/ar/develop/java/depth/quickstart#run
Note: The Depth API is not supported when running in the Android Emulator. Use a physical supported device to test the Depth API.

Continuous speech recognition in android app without google popup

I am working on a project on "Home Automation" system with Android app and Microcontroller , connecting them through Bluetooth module. I have incorporated "speech to text" for voice commands. Although , it works well with the built-in google speech recognition api. All I need is a continuous speech recognition and without the google voice pop-up.
I have seen a similar app on playstore "speechnotes" that works exactly i wish to develop. And it works totally offline.
You should try Droid Speech it supports continuous voice recognition and also will work offline if the speech package for the required language is installed in the device.
Setting the library in your project is very simple and with a few lines of code you can easily start using speech recognition.
An example,
Add the below in your Gradle file,
compile 'com.github.vikramezhil:DroidSpeech:v2.0.3’
In your Activity,
DroidSpeech droidSpeech = new DroidSpeech(this, null);
droidSpeech.setOnDroidSpeechListener(this);
To start droid speech to listen to user voice call the method,
droidSpeech.startDroidSpeechRecognition();
The speech result will be triggered at,
#Override
public void onDroidSpeechFinalResult(String finalSpeechResult)
{
// Do whatever you want with the speech result
}

Is there any how can we install the app on android emulator from google-play

Anybody tell me how to install apps on emulator from google-play store
Simple Answer:
Just install first Google Play store in your emulator from ADB. and then using your gmail account you can install apps as like in your Android Phone.
OtherWise as #Williams said get apk source from anywhere and install using adb..
Link for setup Google Play service in your emulator
Check Set Up Google Play Services
now Android 4.2.2 platform includes Google Play services. Just use an emulator running Jelly Bean. then no need to victim of using third party distributing play service apk.
Thanks..
i don't believe its possible to get APKs via google play store on the emulator; hacking concerns... The google play app is only available to certain licensed manufacturers. See similar question here
Simple Answer : Not possible to install the app from the Google Play in emulator because Emulator does not have Play Store app.
If you can get the APK from some source then you can install that in the simulator using the adb
you have to download 1.ARM-Translation_v1.1.zip and 2.gapps-jb-20121212.signed.zip.
1st you have to drag the ARM-Translation and a/c to instruction you will go.
2nd step you have to drag the gapps-jb-20121212 then a/c to instruction you will go then u see in your Genymotion emulator has playstore or some google apps ....
i think i will help to you....

Capture android screen and create video programmatically

In Android/Java, Is there any code example to capture the screenshot of a computer with good frames per second programatically and create video?
I'd like a tutorial or full source code to do this. I'd like the program to work with and without the device having been "rooted".
There is app in the play store called Screencast Video Recorder that does this. But you need to ROOT the device for it to work, so I know it can be done.
What's the best way to capture android screenshot and create a video programmatically on a non-rooted device?
There is an app called Telecine that is open source that allows you to record screens - the code can be found at https://github.com/JakeWharton/Telecine. All credit is to Jake Wharton.
If you need an example, you can find one at Commonsware's github page - Mark Murphy has provided a sample app for both screen capture and screen recording using the MediaProjection APIs.
you can capture the screen via using DDMS as adb runs and has permission to the framebuffer:
follow this link for more details :
http://thetechjournal.com/electronics/android/how-to-capture-screenshots-and-record-video-on-android-device.xhtml
ALSO
check this links may be get some ideas about what you need :
http://answers.oreilly.com/topic/951-how-to-capture-video-of-the-screen-on-android/
http://www.mightypocket.com/2010/09/installing-android-screenshots-screen-capture-screen-cast-for-windows/
and check this project :
http://sourceforge.net/projects/ashot/
hope this help .
Check the following link
https://code.google.com/p/java-remote-control/
in this project the owner has created a java remote control i.e. he has captured the images from the remote computer and transfer to server and convert it to movies with different format all you need to understand what he has done and implement the same for all your needs. you can access the full source code with SVN client from the following URL
http://java-remote-control.googlecode.com/svn/trunk/
Also you can look for the Remote class in java which provides createScreenCapture method
As of Android 4.4, there is a screen recording feature accessible via adb.
http://developer.android.com/tools/help/adb.html#screenrecord
The screenrecord command is a shell utility for recording the display of devices running Android 4.4 (API level 19) and higher. The utility records screen activity to an MPEG-4 file, which you can then download and use as part of a video presentation. This utility is useful for developers who want to create promotional or training videos without using a separate recording device.
Try this application from the market
https://play.google.com/store/apps/details?id=com.ms.screencastfree
** Does not work on Galaxy Nexus or Tegra 2/3 yet **
EDIT 28/11/2014
Lollipop has been released and provides a new Screen recording API
http://developer.android.com/about/versions/android-5.0.html#UI
Screen capturing and sharing
Android 5.0 lets you add screen capturing and screen sharing
capabilities to your app with the new android.media.projection APIs.
This functionality is useful, for example, if you want to enable
screen sharing in a video conferencing app.
The new createVirtualDisplay() method allows your app to capture the
contents of the main screen (the default display) into a Surface
object, which your app can then send across the network. The API only
allows capturing non-secure screen content, and not system audio. To
begin screen capturing, your app must first request the user’s
permission by launching a screen capture dialog using an Intent
obtained through the createScreenCaptureIntent() method.
For an example of how to use the new APIs, see the MediaProjectionDemo
class in the sample project.

Testing touchscreen with Android Emulator?

Is it possible to simulate or test Touchscreen input with the Android Emulator?
I'm working on a project which needs to support touchscreen input, but I don't have an Android phone myself. However if I could use my mouse to simulate/test touchscreen support in my app, it would be perfect.
Yes, you can implement the OnTouchListener and then on the emulator you can use your mouse.
A small tutorial here
http://www.mybringback.com/tutorial-series/3279/android-the-basics-32-androids-ontouchlistener-and-motionevent/
It's theoreticaly possible. But to date multitouch support requires a real Android 4.0 device to send multitouch input to the emulator. However, in this case you don't need the emulator and can test directly on the physical device.
You can read latest information about multitouch support here.

Categories