安全性权限错误 - 三星齿轮SAP [英] Security Privilege Error - Samsung Gear SAP

查看:178
本文介绍了安全性权限错误 - 三星齿轮SAP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继三星SAP提供者/消费者的教程,我得到一个安全错误,当我运行connect()方法:

I'm following the Samsung SAP provider/consumer tutorial and I'm getting a security error when I run the connect() method:

function connect() {
    console.log("trying to connect");
    document.getElementById('label').innerHTML = 'trying to connect';
    if (SASocket) {
        alert('Already connected!');
        return false;
    }
    try {
        webapis.sa.requestSAAgent(onsuccess, onerror);
    } catch(err) {
        console.log("exception [" + err.name + "] msg[" + err.message + "]");
        document.getElementById('errorlabel').innerHTML = "exception [" + err.name + "] msg[" + err.message + "]";
    }
}

JS / main.js(74):异常[引发SecurityError]味精[该应用程序没有权限调用此方法]

在我的config.xml中我有:

In my config.xml I have:

<tizen:privilege name="http://devloper.samsung.com/privilege/accessoryprotocol"/?

我需要别的例如证书?我可以运行示例项目没有问题,而我自己的证书,但我做的
需要一个证书,如果我从头开始创建应用程序自己?

Do I need anything else e.g. a certificate? I can run the sample projects no problem without my own certificate but do I need a certificate if I created the app myself from scratch?

更新 - 解决方案:
两件事情
- 1.错字! devloper应该是开发商
- 2 @Nana加尔泰也是正确的 - 需要一个证书来测试设备上,通过发送CSR三星(在他们的开发者网站的详细信息)获取此

Update - Solution: Two things - 1. typo! devloper should be developer - 2. @Nana Ghartey is also correct - a certificate is needed to test on the device, get this by sending a CSR to Samsung (details on their developer site).

推荐答案

您只需要,如果你想测试一个真实的设备上的齿轮部件的消费者应用程序生成证书。在模拟器上运行时,你并不需要它。

You only need to generate a certificate if you want to test your gear consumer widget apps on a real device. You don't need it when running on the emulator

您可以找到有关在IDE的帮助部分证书的详细信息(帮助内容>入门 Tizen耐磨>开发环境> Tizen SDK可穿​​戴>证书)。

You can find more information about certificates in the Help section of the IDE (Help Contents > Getting Started with Tizen Wearable > Development Environment > Tizen SDK for Wearable > Certificates).

关于权限问题,附件协议特权是一个公开的权限级别,它允许应用程序使用SAP连接和齿轮及主机设备之间传输文件。我面对使用这种特权的问题。

Regarding the Privilege issue, the accessory protocol privilege is a public level privilege that allows apps to use SAP to connect and transfer files between gear and host devices. I faced no problems using this privilege.

或许,在main.js 74行需要一个合作伙伴/平台的特权。请注意,在商用设备安装应用程序,开发应用程序只与公共级别的权限。特权是基于其安全的影响分为三个层次:

Perhaps, line 74 in main.js requires a Partner/Platform privilege. Note that install apps on commercial devices, develop apps only with public level privileges. Privileges are categorized into three levels based on their security impact:

公开

这些权限开放给所有Tizen应用程序开发者。

These privileges are open to all Tizen application developers.

合作伙伴

这些权限只能由注册在Tizen门店伙伴开发人员使用。

These privileges can only be used by developers registered as partners on the Tizen store.

开发人员必须由Tizen商店的合作伙伴策略中使用公共和合作伙伴级别的特权得到充分确认和允许的。

The developer must be fully identified and permitted by the partner policy of the Tizen Store to use both public and partner level privileges.

平台

这些权限在系统API用于管理Tizen平台。

These privileges are used in system APIs for managing the Tizen platform.

这些权限只对一组特定的Tizen应用开发者开放。

These privileges are open only to a specific set of Tizen application developers.

有关详细信息请查看安全架构<一个href=\"https://developer.tizen.org/dev-guide/2.2.0/?topic=/org.tizen.gettingstarted/html/tizen_overview/security.htm\"相对=nofollow>指南

For more info check out the Security Architecture guide

这篇关于安全性权限错误 - 三星齿轮SAP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆