By

What's new for Cordova 2.7.0 Android

Another month rolls by, and as usual, another release of Cordova happens. Some of the big highlights this month are as follows:

  • Camera.getPicture() is fixed for Picasa images
  • Plugin.java is deprecated for CordovaPlugin, plugins must be updated to support this change. This has followed our deprecation policy.
  • device.name has been removed, since it's useless on most Android devices, and doesn't make sense on iOS
  • Plugins can now intercept URLs with question marks, number signs and escaped spaces.
  • URL parsing is now more robust
  • localStorage is once again persistant, this breaks WebSQL on Android 4.x

The last change is the most irritating and is one that we're currently struggling with. Many people use WebSQL in their applications. The problem with this is that it's not a supported W3C specification, and as such is something that not every platform supports. On Android 3.x and up, the Android team made it so that file URIs can't open databases. A workaround from the early days of Cordova was used to get around this issue, but there are numerous design issues, and this isn't guaranteed to work the same way as WebSQL. This is why, for now, we recommend that people use the WebStorage APIs instead of WebSQL, because it is supported across platforms, and is much less likely to break. And even when WebStorage does break, we will fix WebStorage, even if it means breaking WebSQL.

There is a proposed fix for WebSQL where Cordova applications use a different URI scheme, but that may not be implemented until after 3.0 is released. In the meantime, we recommend that other alternatives be used, but we recommend WebStorage. We apologize for the inconvenience since this is something that is beyond our control.