Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No onscreen keyboard while Android TV Remote integration connected/enabled #94063

Closed
djgrazzy opened this issue Jun 5, 2023 · 16 comments · Fixed by #95765
Closed

No onscreen keyboard while Android TV Remote integration connected/enabled #94063

djgrazzy opened this issue Jun 5, 2023 · 16 comments · Fixed by #95765

Comments

@djgrazzy
Copy link

djgrazzy commented Jun 5, 2023

The problem

I don't have a great need for this integration but was giving it play anyway and have noticed a potential issue.

I have 4 devices (not all used regularly)
#1 TCL Google TV
#2 Chromecast w/ Google TV (4K original)
#3 Xiaomi Android Tv Stick
#4 Xiaomi MiBox S Android TV

I don't believe 3+4 have the issue but have available to retest and confirm if its helpful
#1 TCL Google TV has an issue where where if you get to a text box where a keyboard can be used (as an alternate to voice say you want to be quite or voice isn't resolving your request) the interface detects a remote device connected with remote control capability. This is the same behavior when my pixel is connected with google home in remote mode so it makes sense.
"use the keyboard on the mobile device) attached below
I don't know what the answer is to this problem but it appears this remote keyboard feature (handy for copy and pasting complex passwords) isn't built to handle mutiple remote connections but thought it bets to highlight for thought/discussion.

I think #2 has the issue as well but my partner has just taken it with her on travels. This would then appear to only affect the newer google TV interface and NOT the older android TV interface..

First time logging a git issue so please be gentle with criticism. Happy to provide more logs/info and testing but for me personally I don't use or need enough so have simple disabled for those devices.

What version of Home Assistant Core has the issue?

core-2023.5.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

androidtv_remote

Link to integration documentation on our website

https://www.home-assistant.io/integrations/androidtv_remote

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

android_tv
What keyboard access should look like.
To reproduce you can simple use the search function from the google tv home screen (top right)
tv_with_keyboard

@home-assistant
Copy link

home-assistant bot commented Jun 5, 2023

Hey there @tronikos, @Drafteed, mind taking a look at this issue as it has been labeled with an integration (androidtv_remote) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of androidtv_remote can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign androidtv_remote Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


androidtv_remote documentation
androidtv_remote source
(message by IssueLinks)

@ludoz
Copy link

ludoz commented Jun 7, 2023

Hi,

Same problem here with Nvidia Shield.

Thanks

@Drafteed
Copy link
Contributor

Drafteed commented Jun 7, 2023

Do you have the latest version of Android TV Remote Service app installed?

@djgrazzy
Copy link
Author

djgrazzy commented Jun 7, 2023

Have checked on my TCL, checked for updates in the play store multiple times so running the latest available.

PXL_20230607_102613248

@djgrazzy
Copy link
Author

djgrazzy commented Jun 7, 2023

It's kind of expected behaviour I guess.
For example if I have the "remote" open on the Google home app the TV behaves the same. The system is really only designed to handle one connection at a time and detects an active remote connection whenever a text field promt on the screen is entered.

Screenshot_20230607-203437~2
Screenshot_20230607-203440
Screenshot_20230607-203629

@Drafteed
Copy link
Contributor

Drafteed commented Jun 7, 2023

It's kind of expected behaviour I guess.

This behavior is not observed on my devices. It is also worth noting here that your on-screen keyboard looks different.

Please try the following:

Go to Settings -> System -> Keyboard -> Current Keyboard and select Gboard.
If Gboard is not present, check that it is installed (Google Play Link)

If that didn't work try: Go to Settings -> System -> Keyboard -> Manage Keyboard and uncheck Virtual Remote Keyboard.

@djgrazzy
Copy link
Author

djgrazzy commented Jun 7, 2023

Good suggestions.

My TCL TV has a keyboard T-IME that can't be uninstalled nor disabled from the GUI to enable the installed gboard (not without using ADB to remove it (how annoying)
Potentially can be uninstalled via ADB but won't have time for quite some time to test.

Disabling the virtual keyboard doesn't have the desired effect. It seems the virtual remote keyboard is knd of linked somehow to the T-IME keyboard
When you disable and enable the virtual keyboard the T-IME keyboard kind of greys out and re-saturates 🤷‍♂️

My Chromecast with google tv is in another state so can't test it either for a while.

PXL_20230607_143133728
PXL_20230607_143311325
original_89efbc62-0227-45a2-bd0a-f553ada379a8_PXL_20230607_144232910

Perhaps @ludoz can test on the shield..

@ludoz
Copy link

ludoz commented Jun 7, 2023

I've tested it.
IMG_20230607_193340
Disabled all keyboards juste keep gboard

IMG_20230607_193505
It seems it does not work

@djgrazzy
Copy link
Author

djgrazzy commented Jun 8, 2023

Had a permissions error with adb trying to disable the TCL (T-IME) keyboard (maybe just an incorrect command?)


EDIT its a neat app below actually I can see from the console windows the correct cmd should have been

shell pm disable-user --user 0 com.tcl.inputmethod.international
Package com.tcl.inputmethod.international new state: disabled-user


I grabbed this app and it auto found my TV on first opening.
https://adbappcontrol.com/en/

I simple searched for the keyboard package by name and disabled.
This allowed my to use gboard which I'm happy to report allows concurrent virtual and onscreen keyboard so no further issues.

Thanks @Drafteed

Interestingly when I re-enable the TCL keyboard the GUI allows me to disable where it didn't before.
I wont be able be bale to test on my 4K Chromecast with Google Tv for some time but consider this closed.

Maybe be worth mentioning in the documentation?
https://www.home-assistant.io/integrations/androidtv_remote

Any non gbaord keyboard will need to support thsi concurrent use and any issues should be directed toward the devs of those keyboards (eg TCL,)

BeyondTV4:/ $ pm list packages -f | grep inputmethod.int
package:/product/app/T_IME/T_IME.apk=com.tcl.inputmethod.international
BeyondTV4:/ $ pm disable com.tcl.inputmethod.international

Exception occurred while executing 'disable':
java.lang.SecurityException: Shell cannot change component state for com.tcl.inputmethod.international/null to 2
at com.android.server.pm.PackageManagerService.setEnabledSetting(PackageManagerService.java:21192)
at com.android.server.pm.PackageManagerService.setApplicationEnabledSetting(PackageManagerService.java:20997)
at com.android.server.pm.PackageManagerShellCommand.runSetEnabledSetting(PackageManagerShellCommand.java:2167)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:236)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21813)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4603)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4427)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)
255|BeyondTV4:/ $

image

@tronikos
Copy link
Member

tronikos commented Jun 8, 2023

Great you were able to solve this. In home-assistant/home-assistant.io#27273 I'm adding a troubleshooting/known issues in the documentation. Any suggestions what one line of text to add there for others that might encounter the same?

@djgrazzy
Copy link
Author

djgrazzy commented Jun 8, 2023

Perhaps something like something like
"Some onscreen keyboards enabled by tv manufactures are known not to support concurrent virtual and onscreen keyboard use.
This presents whenever a text field is selected such as "search" where a constant "use the keyboard on your mobile device" will show preventing you from opening the onscreen keyboard to type.
This can be overcome by disabling your "3rd party" keyboard and using the default gboard keyboard."

@DcR-NL
Copy link

DcR-NL commented Jun 10, 2023

Same issue here; glad I've found the cause, because it drove me insane.

@djgrazzy

This can be overcome by disabling your "3rd party" keyboard and using the default gboard keyboard."

This suggested solution is not applicable to my situation. On my Shield 2019, the input constantly switches to "Use the keyboard on your mobile device". Even though I have set gboard as the default keyboard and disabled everything except gboard under the keyboards settings. The only solution at the moment is to remove the integration in Home Assistant.

@djgrazzy
Copy link
Author

djgrazzy commented Jun 10, 2023

Oh that's a shame. Curious did you have to make any changes to get to the point of having only gboard + virtual remote keyboard?

The reason I ask is there's a chance the shield may need a reboot after applying?

Are both of those apps/services the latest available in the play store?
(Perhaps post version numbers and we can compare)

Android TV Remote Service
Version 5.2.473254133
com.google.android.tv.remote.service

Gboard
Version 11.0.02.392406365-tv_release-armeabi-v7a
com.google.android.inputmethod.latin

PXL_20230610_192450023
PXL_20230610_192502341
PXL_20230610_192526946

@djgrazzy
Copy link
Author

djgrazzy commented Jun 10, 2023

And just to ensure we are comparing apples with apples Ive noticed If I have the integration device open in HA I can see the Google tv home screen shows the app as launcherx and when I click search in the top right hand corner (this is where I'm testing the onscreen keyboard) HA shows the app being used is Katniss.
(In case that app needs to support the functionality etc)

20230611_063840-COLLAGE

@artinbastani
Copy link

Any update on this?

I also have nvidia shields and all devices I set this up on are stuck with Use keyboard on mobile device screen

I only have gboard active and disabled the virtual keyboard in the manage keyboards tab.

Even after reboots it doesn’t work.

Same versions of android tv services and gboard as the screenshots above.

@tronikos
Copy link
Member

tronikos commented Jul 3, 2023

#95765 adds an option to disable IME, which is currently only used for getting the current app id, as a workaround for this.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants