Domain White List on Android 2.3 on newer phonegaps (e.g. 2.8)
Summary:
Add this class: https://github.com/android/platform_frameworks_base/blob/master/core/java/android/webkit/WebResourceResponse.java
delete the line that says:
import android.net.http.Headers;
...it is not used anywhere.
Newer versions of Codova/Phonegap does not support domain white listing when running the resulting app on Android 2.3 devices. The error message is:
Could not find class 'android.webkit.WebResourceResponse', referenced from method org.apache.cordova.CordovaWebViewClient.getWhitelistResponse
Reason is that is looking for the WebResourceResponse class and cannot find it. Just download it from github at the afore mentioned address, and put in your source tree.
The incompatibility with Android 2.3 seems to have crep t in in Phonegap 1.9, according to a comment on this blog post:
http://richdotnet.blogspot.se/2012/07/create-your-first-phonegap-project-with.html