Android Configuration
The config.xml
file controls an app's basic settings that apply
across each application and CordovaWebView instance. This section
details preferences that only apply to Android builds. See The
config.xml File for information on global configuration options.
-
KeepRunning
(boolean, defaults totrue
): Determines whether the application stays running in the background even after apause
event fires. Note: setting this to false will not kill the app after a pause event, it will only halt execution of code in the cordova webview while the app is in the background.<preference name="KeepRunning" value="false"/>
-
LoadUrlTimeoutValue
(number in milliseconds, default to20000
, 20 seconds): When loading a page, the amount of time to wait before throwing a timeout error. This example specifies 10 seconds rather than 20:<preference name="LoadUrlTimeoutValue" value="10000"/>
-
SplashScreen
(string, defaults tosplash
): The name of the file minus its extension in theres/drawable
directory. Various assets must share this common name in various subdirectories.<preference name="SplashScreen" value="mySplash"/>
-
SplashScreenDelay
(number in milliseconds, defaults to3000
): The amount of time the splash screen image displays.<preference name="SplashScreenDelay" value="10000"/>
-
InAppBrowserStorageEnabled
(boolean, defaults totrue
): Controls whether pages opened within an InAppBrowser can access the same localStorage and WebSQL storage as pages opened with the default browser.<preference name="InAppBrowserStorageEnabled" value="true"/>
-
LoadingDialog
(string, defaults tonull
): If set, displays a dialog with the specified title and message, and a spinner, when loading the first page of an application. The title and message are separated by a comma in this value string, and that comma is removed before the dialog is displayed.<preference name="LoadingDialog" value="My Title,My Message"/>
-
LoadingPageDialog
(string, defaults tonull
): The same asLoadingDialog
, but for loading every page after the first page in the application.<preference name="LoadingPageDialog" value="My Title,My Message"/>
-
ErrorUrl
(URL, defaults tonull
): If set, will display the referenced page upon an error in the application instead of a dialog with the title "Application Error".<preference name="ErrorUrl" value="myErrorPage.html"/>
-
ShowTitle
(boolean, defaults tofalse
): Show the title at the top of the screen.<preference name="ShowTitle" value="true"/>
-
LogLevel
(string, defaults toERROR
): Sets the minimum log level through which log messages from your application will be filtered. Valid values areERROR
,WARN
,INFO
,DEBUG
, andVERBOSE
.<preference name="LogLevel" value="VERBOSE"/>
-
SetFullscreen
(boolean, defaults tofalse
): Same as theFullscreen
parameter in the global configuration of this xml file. This Android-specific element is deprecated in favor of the globalFullscreen
element, and will be removed in a future version.