语言

Menu
Sites
Language
Tizen is not defined

I am developing a Samsung TV application using ReactJs. I tried to register the remote keys by following the instructions given in "https://developer.samsung.com/smarttv/develop/guides/user-interaction/remote-control.html" document.

When I register the numerical keys using the following code,

tizen.tvinputdevice.registerKey(‘1’);      // 1 is the number in remote.
tizen.tvinputdevice.registerKey(‘2’);
tizen.tvinputdevice.registerKey(‘3’);
tizen.tvinputdevice.registerKey(‘4’);
tizen.tvinputdevice.registerKey(‘5’);
tizen.tvinputdevice.registerKey(‘6’);
tizen.tvinputdevice.registerKey(‘7’);
tizen.tvinputdevice.registerKey(‘8’);
tizen.tvinputdevice.registerKey(‘9’);
tizen.tvinputdevice.registerKey(‘0’);

I get the error message as “tizen is not defined” in the console. As mentioned in the document, I have updated the privilege on the config.xml as
“<tizen:privilege name=‘Tizen Privilege | Tizen’></tizen:privilege>”.

How to fix the "tizen is not defined" error? where should I define tizen? Please assist.