1. Make handling of multi-page apps consistent with iOS and Blackberry to load into same webview (instead of starting a new activity).
2. Make lifecycle consistent. pause is called when going into background, resume is called when coming into foreground. It is no longer called when loading or leaving an HTML page. Use window.onload/onunload to get these notifications.
Both iOS and BlackBerry support the PNG image format so I added support for Android.
Also, iOS and BB use targetWidth/targetHeight to specify the resolution of the image. I've swiched from using maxResolution to targetWidth/targetHeight in this change list.
Calling Media.seekTo() now updates the Media._position value. I could not make seekTo() to work when your audio clip is not playing as that is not a supported action of the AndroidMedia player class.
- Replacing currentNW and homeNW with networkName.
- Changing Connection constants to strings instead of ints.
- Firing online/offline events on network change.
I could not get rid of the url encoding and decoding without hampering some users ability to pass non-ascii characters back to JavaScript. However, I was able to reduce the amount of data being passed from Java to JavaScript by 40% by decoding common characters that occur in JSON and XML. These characters will survive the round trip just fine and don't need to be encoded.
This is the best solution I could come up with. You won't be able to read files as large as you could in 0.9.4 but it will get close and it will support non-ascii characters.
I did my best to clean up the JavaScript so it would pass through jsHint more cleanly. There still are issues but there are a lot fewer now. This helped to make the JS code more consistent.
Android 2.2 introduces the navigation.connection interface but it does not work properly in WebView. So in order to get the proper connection information we had to implement our own connection interface which is accessible at navigator.network.connection.
Issue #82: The RandomAccessFile class in Android's version of Java does not write non-ASCII characters very well. I've switched to using a FileOutputStream which seems to work just great. Tested by myself and folks from Egypt and the Netherlands.
Issue #87: Fixed a problem where the file errors were being returned as evt.target.result.code.code.
The way were were detecting we were on an Android 3.0 device was not applicable for Android 3.1. I've made and update so that any Android 3.X device will use our implementation of web sql databases instead of the built in one which thows a security error.
The FileEntry.createWriter() method passes in a FileEntry object instead of a File object. As a result the FileWriter.length was not being set properly so when you do a writer.seek(writer.length) it would go to 0, so your next write would overwrite your file.
In order to fix this issue the FileEntry.createWriter() method now makes a call to FileEntry.file() to get the correct file size. The File object is now passed to the FileWriter constructor.
For Android version 2.2 or better the navigator.connection object already
exists. If this case we should immediately fire the onPhoneGapConnectionReady
event so we don't tie up the 'deviceready' event.