Firefox OS 学习——manifest.webapp结构分析

         在Firefox OS 学习——Gaia 编译分析  这篇文章多次提到manifest.webapp文件,对于做过android app 开发的人来说,都很熟悉Android.mk 和Manifest.xml文件。在Firefox OS中,manifest.webapp的作用是综合了android 中的Android.mk 和Manifest.xml的作用。下面就具体说说manifest.webapp的结构及其内容。

        manifest.webapp采用的是json的数据格式(键值对的形式),它描述了app 的name,icon,loacl,premissions等相关的信息。先看一个相对完整的manifest.webapp的格式及其内容:

{
    "name": "MozillaBall",
    "description": "Exciting Open Web development action!",
    "launch_path": "/",
    "version": "1.0",
    "type": "privileged",
    "icons": {
      "16": "/img/icon_16.png",
      "48": "/img/icon_48.png",
      "128": "/img/icon_128.png"
    },
    "developer": {
      "name": "Mozilla",
      "url": "https://mozilla.org/en-US"
    },
    "installs_allowed_from": [
      "https://marketplace.mozilla.org"
      "https://marketplace.example.org"
     ],
    "appcache_path": "/cache.manifest",
    "locales": [
      "es": {
        "description": "¡Acción abierta emocionante del desarrollo del Web!",
        "developer": {
          "url": "https://mozilla.org/es-ES"
        }
      }      
      "it": {
        "description": "Azione aperta emozionante di sviluppo di fotoricettore!",
        "developer": {
          "url": "http://it.mozillalabs.com/"
        }
      }
    ],
    "default_locale": "en",
    "screen_size": {
      "min_width": "600",
      "min_height": "300"
    },
    "required_features": [
      "touch", "geolocation", "webgl"
    ],
   
  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值