[
https://issues.apache.org/jira/browse/CB-199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Simon MacDonald resolved CB-199.
--------------------------------
Resolution: Fixed
Fix Version/s: 1.4.0
The download method in FileTransfer was setting the
HttpURLConnection.setDoOutput to true. On Android 4.0 this would force the
connection to be a POST when what we actually want is a GET.
I removed the offending line and tested the fix in 2.1, 2.2, 2.3 and 4.0.
> FileTransfer.download fails on Android 4.0
> ------------------------------------------
>
> Key: CB-199
> URL: https://issues.apache.org/jira/browse/CB-199
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.3.0
> Environment: This bug is only reproducible on Android 4.0. It works
> on earlier versions of Android.
> Reporter: Simon MacDonald
> Assignee: Simon MacDonald
> Fix For: 1.4.0
>
>
> This bug was reported by Sumit Verma (sumit [dot] verma [at] ten24web [dot]
> com) and verified by me.
> Anyway, Ray was helping me with file download. Using his example (
> http://www.raymondcamden.com/index.cfm/2012/1/19/Downloading-files-to-a-PhoneGap-application--Part-1
> ) I got it to work in iOS and Android 2.3.3 but, I keep getting error in
> Android 4.0.3 AVD and in ASUS Prime. Here is the error:
> 01-24 00:48:33.855: D/FileUploader(525):
> http://www.raymondcamden.com/demos/2012/jan/17/demotivational-posters-muppet-x-men.jpg
> 01-24 00:48:33.855: D/FileUploader(525): java.io.FileNotFoundException:
> http://www.raymondcamden.com/demos/2012/jan/17/demotivational-posters-muppet-x-men.jpg
> 01-24 00:48:33.855: D/FileUploader(525): at
> libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177)
> 01-24 00:48:33.855: D/FileUploader(525): at
> com.phonegap.FileTransfer.download(FileTransfer.java:394)
> 01-24 00:48:33.855: D/FileUploader(525): at
> com.phonegap.FileTransfer.execute(FileTransfer.java:102)
> 01-24 00:48:33.855: D/FileUploader(525): at
> com.phonegap.api.PluginManager$1.run(PluginManager.java:150)
> 01-24 00:48:33.855: D/FileUploader(525): at
> java.lang.Thread.run(Thread.java:856)
> 01-24 00:48:33.865: E/FileUploader(525): Error while downloading
> 01-24 00:48:33.865: E/FileUploader(525): java.io.IOException: Error while
> downloading
> 01-24 00:48:33.865: E/FileUploader(525): at
> com.phonegap.FileTransfer.download(FileTransfer.java:415)
> 01-24 00:48:33.865: E/FileUploader(525): at
> com.phonegap.FileTransfer.execute(FileTransfer.java:102)
> 01-24 00:48:33.865: E/FileUploader(525): at
> com.phonegap.api.PluginManager$1.run(PluginManager.java:150)
> 01-24 00:48:33.865: E/FileUploader(525): at
> java.lang.Thread.run(Thread.java:856)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira