You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Michael Sierra <ms...@adobe.com> on 2013/09/13 17:23:01 UTC

config.xml doc queries

I'm doing a bunch of cleanup work on the doc about config.xml
preferences, and have accumulated a faceful of queries I could use
some help with. I'm also folding in some parallel PhoneGap Build doc
where appropriate, but suspect some of it may be out of date. At least
one preference applies only to remote PhoneGap builds, and not to
Cordova.  You could save me a lot of time testing & untangling all
this. I separated them out for those with special expertise with
iOS/Android/BB platforms. Any other undoc'ed prefs, please let me
know. Thanks in advance.

IMAGES:

* Some of the doc is unclear. Please confirm that placing an icon.png
  in the app dir, but without referencing it via <icon> tag, enables
  it & overrides the default cordova icon.

* Does the splash.png file behave the same way: apply by default, even
  when not referenced via <gap:splash> tag?

CROSS-PLATFORM:

* For HideKeyboardFormAccessoryBar, does the default form-helper UI
  only appear when there's more than one input within a form?

* Please confirm the phonegap-version preference applies only to
  PhoneGap Build.

* AFAYK, do any platforms _not_ support the viewport metatag?  Do any
  not allow user scaling by default?

IOS:

* Please confirm EnableViewportScale allows a viewport metatag to
  control the range of user scaling. That is, with
  EnableViewportScale=true, a viewport metatag may actually
  _disable_ user scaling.

* Based on the above, is it safe to assert the default behavior for a
  cordova web view in iOS allows user scaling absent a metatag that
  disables it?

* Is the deprecated EnableLocation pref still functional?

* As an alternative to the deprecated EnableLocation pref, current doc
  suggests calling the Geolocation plugin with the "onload" attribute.
  Is this method of passing options only possible via config.xml's
  <feature> tag, as opposed to using the CLI's "plugin add"?

* Unfamiliar with the KeyboardShrinksView effect. Are there any
  obvious examples of an app whose webview shrinks as described when
  the keyboard appears?

* Also not sure what "spinner" UI effect ShowSplashScreenSpinner
  produces.  Any obvious examples?

* The PhoneGap Build doc references "show-splash-screen-spinner" and
  "auto-hide-splash-screen" preferences. Please confirm they're
  superseded by ShowSplashScreenSpinner and AutoHideSplashScreen.

* Does MediaPlaybackRequiresUserAction also apply to audio, or just
  video? Either way, please confirm the scope is media's autoplay attribute,
  and that JS can initiate playback with no user input.

* The following preferences are listed in PhoneGap Build doc
  (http://build.phonegap.com/docs/config-xml), but not in Cordova doc
  for iOS config options. Please confirm if these work, and/or have
  been renamed as CamelCase:

  - target-device (handset|tablet|universal)
  - webviewbounce
  - prerendered-icon
  - ios-statusbarstyle (default|black-opaque|black-translucent)
  - detect-data-types
  - exit-on-suspend

* Is the deprecated stay-in-webview (or StayInWebview) still enabled?

ANDROID:

* PhoneGap Build doc lists a splash-screen-duration preference. Does
  it apply to Cordova, and is it renamed SplashScreenDuration?

* is the useBrowserHistory preference deprecated, as promised would
  happen in 4/13? The doc explaining what it does is opaque, and I'm
  inclined to remove it. Otherwise clarify, thanks.

* Unclear when loadingDialog & loadingPageDialog would appear in an
  app. Any obvious examples? I'm adding an example that reads: "Please
  wait, the app is loading" (or "data is loading")

* Does the errorUrl page display in response to standard HTTP errors
  in the 400-500 range?

* Please confirm the load-url-timeout pref listed in PhoneGap Build
  doc is superseded by loadUrlTimeoutValue. Also confirm the latter is
  also expressed in milliseconds and defaults to 20000.

* does keepRunning mean in effect the app continues to execute
  e.g. following the pause event? Does the pause event still fire?

* Am unfamiliar with the disallowOverscroll "glow" effect. Are there
  any obvious examples?

* Do android-minSdkVersion & android-maxSdkVersion apply to Cordova
  rather than just PhoneGap Build? Does it work? Is it ReNamed?

* Same for android-installLocation.

BLACKBERRY:

* BlackBerry config doc lists its own "orientation" preferance that
  varies from the global preference. Does BB not recognize "default"
  as a value? Do no other platforms recognize "auto" as BB appears to?

* Doc for Android's backgroundColor uses black as a sample value:
  "0x00000000". Does BB adhere to the same ARGB format, or it is
  "00000000"?

* PG Build doc lists a disable-cursor preference. Does it work in
  Cordova, and it renamed DisableCursor?

* For popupBlocker, I assume it would disable calls to window.open() &
  the onunload event in an inAppBrowser context. Correct?

* I notice BB's "hideKeyboardFormAccessoryBar" pref starts lowercase
  while iOS's is InitCapped. Please confirm they're case-insensitive.
  If so, will InitCap all to remain consistent.

* Note the HideKeyboardFormAccessoryBar pref is supported by both iOS
  & BB. Likewise for BackgroundColor.  When reading the doc, would you
  prefer sections for platform-specific config options list only
  preferences that are unique to each platform? If so, I'll
  consolidate "multi-platform" prefs in the main config.xml doc along
  with existing "global" prefs. I'm already inclined to consolidate to
  better maintain the doc, but could use feedback. Thanks.

--Mike Sierra

RE: config.xml doc queries

Posted by Michael Sierra <ms...@adobe.com>.
Thanks, Bryan.  If you still think you can answer the main batch of BB queries, can you also check if BB's HideKeyboardFormAccessoryBar pref really responds to 'enable'/'disable' values rather than 'true'/'false' as is doc'ed for iOS?

--Mike Sierra

________________________________________
From: Bryan Higgins [bryan@bryanhiggins.net]
Sent: Friday, September 13, 2013 1:36 PM
To: dev@cordova.apache.org
Subject: Re: config.xml doc queries

I'll try to answer the BB questions:

Orientation - I believe if you supply "default", it will internally use
"auto", but we'll double check.

backgroundColor - We use ARGB as well, ie 0xffff0000

All preferences are case insensitive

+1 on consolidating docs for prefs being used in all platforms


On Fri, Sep 13, 2013 at 1:05 PM, Michael Sierra <ms...@adobe.com> wrote:

> A follow-up query. The BB doc says "8 digits".  Assuming each doc is
> accurate, would you be able to use gap:platform to assign different
> preference values? E.g.:
>
> <preference name="backgroundColor" value="0x00000000"
> gap:platform="android"/>
> <preference name="backgroundColor" value="00000000"
> gap:platform="blackberry10"/>
>
> --Mike S
>
> ________________________________________
> From: Michael Sierra
> Sent: Friday, September 13, 2013 11:23 AM
> To: dev@cordova.apache.org
> Cc: Michael Sierra
> Subject: config.xml doc queries
>
> ...
> * Doc for Android's backgroundColor uses black as a sample value:
>   "0x00000000". Does BB adhere to the same ARGB format, or it is
>   "00000000"?
>

Re: config.xml doc queries

Posted by Bryan Higgins <br...@bryanhiggins.net>.
I'll try to answer the BB questions:

Orientation - I believe if you supply "default", it will internally use
"auto", but we'll double check.

backgroundColor - We use ARGB as well, ie 0xffff0000

All preferences are case insensitive

+1 on consolidating docs for prefs being used in all platforms


On Fri, Sep 13, 2013 at 1:05 PM, Michael Sierra <ms...@adobe.com> wrote:

> A follow-up query. The BB doc says "8 digits".  Assuming each doc is
> accurate, would you be able to use gap:platform to assign different
> preference values? E.g.:
>
> <preference name="backgroundColor" value="0x00000000"
> gap:platform="android"/>
> <preference name="backgroundColor" value="00000000"
> gap:platform="blackberry10"/>
>
> --Mike S
>
> ________________________________________
> From: Michael Sierra
> Sent: Friday, September 13, 2013 11:23 AM
> To: dev@cordova.apache.org
> Cc: Michael Sierra
> Subject: config.xml doc queries
>
> ...
> * Doc for Android's backgroundColor uses black as a sample value:
>   "0x00000000". Does BB adhere to the same ARGB format, or it is
>   "00000000"?
>

RE: config.xml doc queries

Posted by Michael Sierra <ms...@adobe.com>.
A follow-up query. The BB doc says "8 digits".  Assuming each doc is accurate, would you be able to use gap:platform to assign different preference values? E.g.:

<preference name="backgroundColor" value="0x00000000" gap:platform="android"/>
<preference name="backgroundColor" value="00000000" gap:platform="blackberry10"/>

--Mike S

________________________________________
From: Michael Sierra
Sent: Friday, September 13, 2013 11:23 AM
To: dev@cordova.apache.org
Cc: Michael Sierra
Subject: config.xml doc queries

...
* Doc for Android's backgroundColor uses black as a sample value:
  "0x00000000". Does BB adhere to the same ARGB format, or it is
  "00000000"?

Re: config.xml doc queries

Posted by Shazron <sh...@gmail.com>.
Inline, for iOS.


CROSS-PLATFORM:
>
> * For HideKeyboardFormAccessoryBar, does the default form-helper UI
>   only appear when there's more than one input within a form?
>
>
No, it appears all the time. But note that in 3.2.0 this goes away (moved
to a plugin). See https://issues.apache.org/jira/browse/CB-4979


> IOS:
>

> * Please confirm EnableViewportScale allows a viewport metatag to
>   control the range of user scaling. That is, with
>   EnableViewportScale=true, a viewport metatag may actually
>   _disable_ user scaling.
>
>
Yes


> * Based on the above, is it safe to assert the default behavior for a
>   cordova web view in iOS allows user scaling absent a metatag that
>   disables it?
>

Yes


> * Is the deprecated EnableLocation pref still functional?
>
>
No


> * As an alternative to the deprecated EnableLocation pref, current doc
>   suggests calling the Geolocation plugin with the "onload" attribute.
>   Is this method of passing options only possible via config.xml's
>   <feature> tag, as opposed to using the CLI's "plugin add"?
>
>
Yes, feature tag param only


> * Unfamiliar with the KeyboardShrinksView effect. Are there any
>   obvious examples of an app whose webview shrinks as described when
>   the keyboard appears?
>
>
 You can see this better in iOS 7 when the keyboard is translucent.
Basically with this setting is true, your webview is always above the
keyboard, when false, the keyboard is on top of your webview.



> * Also not sure what "spinner" UI effect ShowSplashScreenSpinner
>   produces.  Any obvious examples?
>

Small grey spinner in the middle of your screen. Will be apparent if
AutoHideSplashscreen is false.


>
> * The PhoneGap Build doc references "show-splash-screen-spinner" and
>   "auto-hide-splash-screen" preferences. Please confirm they're
>   superseded by ShowSplashScreenSpinner and AutoHideSplashScreen.
>
>
Question for the Build team, really


> * Does MediaPlaybackRequiresUserAction also apply to audio, or just
>   video? Either way, please confirm the scope is media's autoplay
> attribute,
>   and that JS can initiate playback with no user input.
>

 Both a/v. Yes, it affects autoplay. No, js cannot initiate playback
without user input if this setting is true.


> * The following preferences are listed in PhoneGap Build doc
>   (http://build.phonegap.com/docs/config-xml), but not in Cordova doc
>   for iOS config options. Please confirm if these work, and/or have
>   been renamed as CamelCase:
>
>   - target-device (handset|tablet|universal)
>   - webviewbounce
>   - prerendered-icon
>   - ios-statusbarstyle (default|black-opaque|black-translucent)
>   - detect-data-types
>   - exit-on-suspend
>
>
Question for the Build team, really


> * Is the deprecated stay-in-webview (or StayInWebview) still enabled?
>
>
No idea what this is

Re: config.xml doc queries

Posted by Joe Bowser <bo...@gmail.com>.
On Fri, Sep 13, 2013 at 8:23 AM, Michael Sierra <ms...@adobe.com> wrote:
> I'm doing a bunch of cleanup work on the doc about config.xml
> preferences, and have accumulated a faceful of queries I could use
> some help with. I'm also folding in some parallel PhoneGap Build doc
> where appropriate, but suspect some of it may be out of date. At least
> one preference applies only to remote PhoneGap builds, and not to
> Cordova.  You could save me a lot of time testing & untangling all
> this. I separated them out for those with special expertise with
> iOS/Android/BB platforms. Any other undoc'ed prefs, please let me
> know. Thanks in advance.
>
> IMAGES:
>
> * Some of the doc is unclear. Please confirm that placing an icon.png
>   in the app dir, but without referencing it via <icon> tag, enables
>   it & overrides the default cordova icon.

Cordova Android does not support any <icon> tag in config.xml.

> * Does the splash.png file behave the same way: apply by default, even
>   when not referenced via <gap:splash> tag?

gap:splash is a PhoneGap Build only setting AFAIK.  We have zero
support for <gap:splash> or any other tags for Cordova Android.

> ANDROID:
>
> * PhoneGap Build doc lists a splash-screen-duration preference. Does
>   it apply to Cordova, and is it renamed SplashScreenDuration?

It only applies to 3.1.0, and it's totally different.
SplashScreenDelay is what it's actually called.

>
> * is the useBrowserHistory preference deprecated, as promised would
>   happen in 4/13? The doc explaining what it does is opaque, and I'm
>   inclined to remove it. Otherwise clarify, thanks.
>

Yes, it's no longer relevant.

> * Unclear when loadingDialog & loadingPageDialog would appear in an
>   app. Any obvious examples? I'm adding an example that reads: "Please
>   wait, the app is loading" (or "data is loading")

loadingDialog is for the first page of the app, loadingPageDialog is
for every page.  I think this should be deprecated, because it doesn't
belong in core.

> * Does the errorUrl page display in response to standard HTTP errors
>   in the 400-500 range?

Yes.

> * Please confirm the load-url-timeout pref listed in PhoneGap Build
>   doc is superseded by loadUrlTimeoutValue. Also confirm the latter is
>   also expressed in milliseconds and defaults to 20000.

No idea what the PhoneGap Build preference is, but loadUrlTimeoutValue
is how long we give a page to load before we give up and exit the
application.  It is expressed in milliseconds, and defaults to 20000.

> * does keepRunning mean in effect the app continues to execute
>   e.g. following the pause event? Does the pause event still fire?

Yes.

>
> * Am unfamiliar with the disallowOverscroll "glow" effect. Are there
>   any obvious examples?
>

Any application that has lists or a WebView on Android.  If you scroll
to the top or bottom of a list, you will see a "glow" indicating that
you scrolled to the end of the list.

> * Do android-minSdkVersion & android-maxSdkVersion apply to Cordova
>   rather than just PhoneGap Build? Does it work? Is it ReNamed?

They don't apply to Cordova.  This is just a PhoneGap Build setting.

> * Same for android-installLocation.

Also, only a PhoneGap Build setting.  This isn't relevant for Cordova.

Joe