android / tv-samples

Multiple samples showing best practices in app development on Android TV.
Apache License 2.0
1.02k stars 329 forks source link

Android Tv Searchable function not working on Android 10.0 #27

Open Nathan-Feng opened 4 years ago

Nathan-Feng commented 4 years ago

Hi Android Team I am a developer from OEM Hisense, Right now I am testing tv-amples leanback function in Android TV Platform (including Amlogic S905,Realtek 1319 chipset), I found that searchable function not ok in ATV 10.0, after add log in com.example.android.tvleanback.data.VideoProvider.java line:161 query , and click search funtion in ATV Launcher ,I have got nothing log output, Can you help to check this function? ATV Pie is OK, Thank you.

aaghan commented 4 years ago

For the search by default, there should be mike enabled. Please verify that first. If you don't have mike enabled, need to customize search Fragment

Nathan-Feng commented 4 years ago

@aaghan Hi aaghan ,thank you very much for your reply, Maybe I can describe the issue clearly, after sun tv-sample in android studio and run in Android TV Q platform, I want to check the this link function is OK or not Make TV apps searchable And I have checked the tv-sample creat a sqlite database in /data/data/packagename/databases/leanback.db there are some programs in that db. So I return to the ATV Home Lancher, using voice to speak some suggest text words, result is nothing output. also I input some suggest text from leanback.db, bug not got any result. only Youtube result appear to me . So I think maybe this searchable function is not OK in ATV 10.0 platform. Can you help to check ? Thanks

lancelotchang commented 4 years ago

Hi, we have similar issue. We tested GlobalSearch on ADT-3, it seems Katniss never try to query suggestion from tv-sample. It only send "dummy" query to search provider when user press google assistant. Katniss never send "suggest text" to apps which declared so support Global Search. However, the same tv-sample app runs on Mibox s works as we expected. So, we wonder if there is anyone able to make searchable function(global search) works as intended on ATV 10?

Nathan-Feng commented 4 years ago

@lancelotchang Is your Mibox Android version 10.0 ?

lancelotchang commented 4 years ago

@lancelotchang Is your Mibox Android version 10.0 ?

No, it’s android p, however the version of google app on both devices are identical...

Nathan-Feng commented 4 years ago

@lancelotchang So I think only Android 10.0 has this issue.

IanGClifton commented 4 years ago

Will need to investigate this.

lancelotchang commented 4 years ago

update: after updating Katiness to 4.1.0.310049754, global search works as expected.

Nathan-Feng commented 4 years ago

update: after updating Katiness to 4.1.0.310049754, global search works as expected. @lancelotchang Where can I got Katiness version 4.1.0.310049754 same as you? Thank you

IanGClifton commented 3 years ago

Updates to ATV Assistant (Katniss) went out earlier this year, which should have fixed this issue. @Nathan-Feng can you confirm this is working for you now?

Nathan-Feng commented 3 years ago

Updates to ATV Assistant (Katniss) went out earlier this year, which should have fixed this issue. @Nathan-Feng can you confirm this is working for you now?

@IanGClifton Hi ,I found the GTVS (Android Q )package Katniss version always 3.13.0.278974704, so I updating from Google Play store , Right now : ATV Katness version is 4.3.0.331205520. But when searching something ,the result shown me the same : 'dummy' Can you help to check? Thank you very much.

IanGClifton commented 3 years ago

Yeah, there were substantial changes from 3.x to 4.x of Katniss, so it's best to test on the latest 4.x version at this point. Can you clarify what you mean by the 'dummy' result?

Nathan-Feng commented 3 years ago

Yeah, there were substantial changes from 3.x to 4.x of Katniss, so it's best to test on the latest 4.x version at this point. Can you clarify what you mean by the 'dummy' result?

Hi @IanGClifton In tv-sample. It only send "dummy" query to search provider when I press google assistant. VideoProvider.java line 165:rawQuery always equal dummy

IanGClifton commented 3 years ago

It looks like the dummy query is used to "warm up" the content provider in case of a future query, but you should see a query go to the app if it's specifically named with something like "Play [content] on [app name]" (e.g., "Play instant upload on videos by google").

catmans1 commented 3 years ago

I'm developing Android TV with Android 9. about global search feature, it's difficult to recognize by using voice to speak (even it didn't recognize). with by using search text, it is difficult to find. It always shows the result from youtube although i search with keyword the same my content. can anybody suggest to me about the solution for this?

catmans1 commented 3 years ago

Here is issue tracker related to Android TV searchable feature https://issuetracker.google.com/issues/171236084

DarkMike82 commented 3 years ago

@IanGClifton I have downloaded latest version of tv-samples, and updated Katniss application on my Android device to last version.

When I enter 'zeitgeist' as a search query, Google TV sends 'zeitgeist' to VideoProvider. Video is found in DB and displayed. 2 queries received from this case: 'dummy' and then 'zeitgeist'.

But when I enter another text related to sample videos (e.g. 'fusce', which is 1st word in Video description), Google TV sends only 'dummy' to VideoProvider. Hence no video is found by this query.

Could you please help solving this issue. Thanks in advance.

szaboa commented 3 years ago

@DarkMike82 have you found out what is happening? we are having the same exact issue.

nicusorflorin commented 3 years ago

i seem to have a similar problem, I am running the latest leanback sample on a android 10 emulator, and i get nothing from global search from the app, no matter what i search

evgentset commented 2 years ago

I have Implemented global search in my app based on this sample, and looks like it works incorrectly. When I type 'panda' in search field I got 'dummy' in query() of ContentProvider's (in selectionArgs param). When I type 'pand' I got 'dummy' and 'pand' in that method. That is very strange logic. And as usual, there is no documentation, there is no working sample. Say hello Google :/

I used mibox4 with android TV on android 9. But I'm pretty sure that it can be reproduced on any other android TV device (I checked on other TV devices, mostly xiaomi mi tv).

samandarkuchkarov commented 6 months ago

i downloaded latest version tv-samples Leanback , and run successfully, i want search app content globally, i used key words "new dad", "dummy" but there is no this app, i used google voice search button on dpad for searching, can someone five any idea or any example . thank you