简体   繁体   English

在firefox操作系统中开发特权应用

[英]developing privileged apps in firefox os

Java script works in the basic permission mode. Java脚本在基本权限模式下工作。 when changed to privileged mode, JavaScript does not work. 当更改为特权模式时,JavaScript不起作用。

I found in a post that it does not work on an actual device, but works in the simulator. 我在帖子中发现它不能在实际设备上运行,但可以在模拟器上运行。 But I am trying it in the simulator. 但是我正在模拟器中尝试。

As a matter of fact I got it working once and the contacts API worked for me. 事实上,我让它运行一次,而contacts API对我来说却有效。 It threw an exception once, and after that JavaScript does not work if I specify type as privileged. 它一次抛出异常,此后,如果我将类型指定为特权,则JavaScript将无法正常工作。 Setting it as certified does not help. 将其设置为认证无济于事。

Any help please. 请帮忙。 Thanks in advance. 提前致谢。

Abilash, I'll go through a quick explanation of the app permissions and privileges. Abilash,我将简要介绍应用程序的权限和特权。

As can be found on here , please take a look at this: 可以在这里找到,请看一下:

受信任和不受信任的应用

They way it works, is that Certified apps are meant only for those apps who are embedded to the platform, and privileged apps have to go through the whole marketplace process. 它们的工作方式是,认证应用程序仅适用于嵌入到平台的那些应用程序,特权应用程序必须经过整个市场流程。 Some operations, such as network access, are assumed to be an implicit permission for all apps. 某些操作(例如网络访问)被假定为对所有应用程序的隐式许可。 In general, the more sensitive the operation (for example, dialing a phone number or accessing the Contacts list), the higher the app trust level required to execute it. 通常,操作越敏感(例如,拨打电话号码或访问联系人列表),则执行该操作所需的应用程序信任级别越高。

You might want to take a deeper look at the MDN link I provided above to understand how Privileges and Permissions works. 您可能需要更深入地了解我在上面提供的MDN链接,以了解特权和权限的工作方式。 MDN is fantastic when it comes to Firefox OS questions! 当涉及到Firefox OS问题时,MDN非常棒!

Please, feel free to ask more questions if they appear. 请随时提出更多问题。 I'll leave you with some boilerplate apps that might help you understand more about those. 我将为您提供一些样板应用程序,这些应用程序可以帮助您更多地了解这些应用程序。 Here they are 他们这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM