【问题标题】:Run Tizen SmartTV App without internet access在没有互联网访问的情况下运行 Tizen SmartTV 应用程序
【发布时间】:2016-03-08 16:15:05
【问题描述】:

我目前正在使用 Tizen SDK 为 SmartTV 开发应用程序,当我尝试在没有互联网访问的情况下运行我的应用程序时,我收到以下错误:

您没有连接到互联网。此功能需要互联网访问 WAS0003

我的简单config.xml有如下代码:

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://sssss" version="1.0.0" viewmodes="maximized">
    <tizen:application id="srJXNxHxpd.Basicapplication" package="srJXNxHxpd" required_version="2.4"/>
    <content src="index.html"/>
    <icon src="icon.png"/>
    <name>xxx</name>
    <tizen:profile name="tv"/>
    <tizen:setting screen-orientation="portrait" context-menu="enable" background-support="disable" encryption="disable" install-location="auto" hwkey-event="enable"/>
</widget>

提前致谢,

【问题讨论】:

  • 在 tizen-manifest.xml 中检查您的权限。
  • 我的 config.xml(== 到 tizen-manifest.xml)在上面,它没有权限。

标签: tizen samsung-smart-tv offline-mode tizen-web-app


【解决方案1】:

请在您的config.xml 中添加以下权限和政策,因为如果您的应用程序需要互联网连接,这是必需的。

<tizen:privilege name="tizen.org/privilege/internet"/>
<access origin="*" subdomains="true"/>

通过添加权限,它允许应用程序访问 Internet。此权限适用于本机和 Web 应用程序。

通过config.xml中的&lt;access&gt;元素,开发者可以指定协议、域和子域。

如果您的应用程序不需要任何类型的互联网访问,则无需添加这些。但是,如果您的应用程序需要任何类型的 Internet 访问,则需要添加这些。请再次检查您的功能。

【讨论】:

    【解决方案2】:

    我不确定这是否有帮助,但请尝试将以下行添加到您的 config.xml

    <tizen:metadata key="http://samsung.com/tv/metadata/use.network" value="false"/>
    

    【讨论】:

      【解决方案3】:

      将“http://samsung.com/tv/metadata/use.network”元数据键设置为“false”

      “http://samsung.com/tv/metadata/use.network”键启用或禁用在应用程序启动时检查网络连接。

      source

      【讨论】:

        最近更新 更多