Not hacky way to make RN think it's TV even when it's not (modifying uiMode?)

sdkVersion: ‘42.0.0’
Platforms(Android/iOS/web/all): Android

expo diagnostics

  Expo CLI 4.11.0 environment info:
      OS: Windows 10 10.0.21390
      Node: 14.16.1 - C:\Program Files\nodejs\node.EXE
      npm: 6.14.12 - C:\Program Files\nodejs\npm.CMD
      Android Studio: Version AI-202.7660.26.42.7351085
      expo: ~42.0.1 => 42.0.3
      react: 16.13.1 => 16.13.1
      react-dom: 16.13.1 => 16.13.1
      react-native: => 0.63.2
      react-native-web: ~0.13.12 => 0.13.18
    Expo Workflow: managed

Hey guys, so I need my app to run like it’s Android TV on an AOSP Android box. As a POC I tried to change the function in node_modules/react-native/Libraries/Utilities/ from

get isTV(): boolean {
    return this.constants.uiMode === 'tv';


  get isTV(): boolean {
    return true;

And it works fine on the box. I would like a less hacky way to do it though. The solution would seem to be able to change uiMode to tv, but I found out it’s not a param you can change in expo’s app.json nor does it look like changeable from the JS code. Is there a way to do it?

Thanks ahead.

Hi @jerrybels

Sorry, I don’t know the actual answer, but perhaps you can use patch-package to make the modification to more palatable.


Haha yeah that’s what I ended up doing. Thanks :slight_smile:


This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.