flexn-io / renative

🚀🚀🚀 Unified Development Platform for iOS, tvOS, Android, Android TV, Android Wear, Web, Tizen TV, Tizen Watch, Tizen Mobile, LG webOS, macOS/OSX, Windows, KaiOS, FirefoxOS Firefox TV platforms
https://renative.org
MIT License
1.82k stars 180 forks source link

Focus not working in Android Tv Boxes #581

Closed sandarshnaroju closed 3 years ago

sandarshnaroju commented 4 years ago

I'm currently working on a android tv project with renative. Focus is working fine in emulator but not in android Tv boxes.

It looks similar to this https://www.flipkart.com/sreetek-android-9-0-tv-box-tx6-4gb-32gb-4k-wifi-bluetooth-media-streaming-device/p/itm5cfcd613f5932. onFocus and onBlur are not being called when using with android Tv box. However, it is working fine in emulator.

How should I get it to work?

RicardasN commented 4 years ago

Are you using those methods on a TouchableOpacity? Because a view or other non-focusable component does not support these functions. I had been using Xiaomi MiBox 4, Nvidia Shield and these functions work as expected. The only thing I can come up with, that could be wrong is the component you're calling these functions on.

sandarshnaroju commented 4 years ago

Yes, I am using TouchableOpacity. But onFocus and onBlur are not getting called in Android Tv Box.

iMokhles commented 3 years ago

@sandarshnaroju do you use react-native-keyevent package ?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.