Remote key registration not working

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

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>”.

Please assist.

Since no one responded, I would suggest you open this as a FAQ & Q/A on the Smart TV Seller Office site. They can help you better there.

Ron
Samsung Developer Relations

A bit late to the game, but in case anyone else struggles with this, you’ll need to include the tvinput privilege in your app’s config.xml

<tizen:privilege name="http://tizen.org/privilege/tv.inputdevice"/>

And include an embed for the Tizen Web APIs in your app’s index.html

<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>