【发布时间】:2022-09-27 19:41:17
【问题描述】:
我正在尝试创建一个在基于 Tizen OS 的设备上运行的 React 应用程序。而且我需要使用 B2B API 和 Web API 来打印和获取设备信息。
提供的所有指南都在 Tizen Studio 中使用了 Web App 模式,但没有提及如何在 React 中使用库。
索引.html
<script type=\'text/javascript\' src=\'$B2BAPIS/b2bapis/b2bapis.js\'></script>
<script type=\"text/javascript\" src=\"$WEBAPIS/webapis/webapis.js\"></script>
配置.xml:
<tizen:privilege name=\"http://developer.samsung.com/privilege/serialport\"/>
<tizen:privilege name=\"http://developer.samsung.com/privilege/productinfo\"/>
指南已经提到在 index.html 和 config.xml 文件中添加上述内容。但我不认为我们可以通过上述方法在 React 应用程序中使用该库。
如何访问这两个用于 React 的 API Javascript 库?
标签: tizen tizen-web-app tizen-studio