在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 教程/ HTML/ Cordova config.xml文件
Cordova國(guó)際化
Cordova設(shè)備信息
Cordova教程
Cordova照相機(jī)
Cordova事件
Cordova config.xml文件
Cordova聯(lián)系人
Cordova文件系統(tǒng)
Cordova Plugman
Cordova第一個(gè)應(yīng)用
Cordova存儲(chǔ)
Cordova文件傳輸
Cordova網(wǎng)絡(luò)信息
Cordova振動(dòng)
Cordova對(duì)話框
Cordova加速度傳感器
Cordova白名單
Cordova地理位置
Cordova設(shè)備方向
Cordova InAppBrowser打開(kāi)Web瀏覽器
Cordova多媒體
Cordova開(kāi)機(jī)畫(huà)面
Cordova環(huán)境安裝設(shè)置
Cordova視頻錄制
Cordova后退按鈕
Cordova電池狀態(tài)

Cordova config.xml文件

這是可以改變應(yīng)用程序的配置的地方。在上一個(gè)教程中創(chuàng)建應(yīng)用程序時(shí)我們?cè)O(shè)置反向域名和名稱。這值是可以在 config.xml 文件中更改的。當(dāng)我們創(chuàng)建應(yīng)用程序,默認(rèn)的配置文件也將被創(chuàng)建。打開(kāi) D:\worksp\cordova\CordovaProject\config.xml 文件,其代碼如下:
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>CordovaApp</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" >
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
</widget>

下表說(shuō)明 config.xml 配置每個(gè)元素。

config.xml配置表

元素 詳細(xì)
widget
在創(chuàng)建應(yīng)用程序時(shí)指定的應(yīng)用程序反向域值
name
在創(chuàng)建應(yīng)用程序時(shí)指定的應(yīng)用程序的名稱
description
應(yīng)用程序的說(shuō)明
author 應(yīng)用程序的作者
content
應(yīng)用程序的開(kāi)始頁(yè)面。它放在 www 目錄內(nèi)
plugin
目前已安裝的插件
access 用于控制訪問(wèn)到外部域。默認(rèn)原始值被設(shè)定為*,它表示允許訪問(wèn)的任何域。 此值不會(huì)允許某些特定的URL被打開(kāi),主要用以保護(hù)信息
allow-intent 可讓特定網(wǎng)址要求的應(yīng)用程序打開(kāi)。 例如, <allow-intent href = "tel:*" /> 將允許電話:鏈接打開(kāi)撥號(hào)程序
platform
用于構(gòu)建應(yīng)用程序的平臺(tái)