Profile cover photo
Profile photo
Octavio Anastasio Menocal Cordero
About
Octavio Anastasio's posts

Post has attachment
Hello guys,

I'm having troubles implementing the recognition intent for an Android TV app. As you know in Android 6+ we have to handle permissions and one of them is RECORD_AUDIO. In the google's example

(https://github.com/googlesamples/androidtv-Leanback/commit/76022fd0126b17a82486af9613159262eccef852)

You can see how search feature is implemented. But my problem is that in my onActivityResult the data is NULL and the resultCode = 3. I don't know why resultCode is equal 3. The common options that I've seen so far for resultCode is 0, 1 and -1.

tvSearchFragment.setSpeechRecognitionCallback(new SpeechRecognitionCallback() {

@Override
public void recognizeSpeech() {
// ACTION_RECOGNIZE_SPEECH
startActivityForResult(tvSearchFragment.getRecognizerIntent(), REQUEST_RECOGNIZE_SPEECH);
}
});
.............................................................................................................
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_RECOGNIZE_SPEECH && resultCode == RESULT_OK) {
tvSearchFragment.setSearchQuery(data, true);
}

super.onActivityResult(requestCode, resultCode, data);
}

Do you think I'm missing something?

Thanks in advance.

Post has attachment

Hi there, I'm working on an Android TV app and I'm trying to add a FloatingActionButton but I got this error message:

android.view.InflateException: Binary XML file line #2: Error inflating class.......
You need to use a Theme.AppCompat theme (or descendant) with the design library.

My activity is supposed to use a FAB and the activity's parent theme 
is Theme.Leanback.

I'm working with the current versions of
appcompat
leanback
v7-23.1.0
In AndroidStudio 1.4 imported directly from gradle.

CAN YOU HELP ME PLEASE??? !!!!

Thanks in advance,
Wait while more posts are being loaded