언어 설정

Menu
Sites
Language
Connecting React app with Tizen Web Device API

I would like to build React app for Tizen TV but I am having difficulties accessing Tizen Web Device API in my app. When I try to build it in Tizen studio, I just add <script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script> and I can access API methods by simply writing webapis.network.getVersion(); but how to do it in React app?

Responses

2 댓글
Mincheol Seo

Anyone solved this issue??

Mincheol Seo

For anyone who has the same question regarding this topic.

Looks there is a npm package release in below, but just put the tag in index.html in react code then it would work.

Of course, chromium shows some error message, but just ignore it. And added try {} catch {} to make sure if webapis object is valid, looks that is working

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

https://www.npmjs.com/package/tizen-tv-webapis