network.download works in sim, not on android

Hi, I am having a problem with downloading a file to my android device.

I’ve found out that the problem is that the file name has spaces in it…

can network.download work with spaces?

Thanks, Greg

You didn’t include the “android” part in your post (could be the problem?), as in

settings

{
 android =
 {
  versionCode = “11”,
  usesPermissions =
   {
   “android.permission.INTERNET”,
   “android.permission.WRITE_EXTERNAL_STORAGE”,
   “android.permission.ACCESS_FINE_LOCATION”,
   “android.permission.ACCESS_COURSE_LOCATION”,
  },
 },

}

The full guide is at: http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

Hi mpappas,

It was actually a simple miss… I didn’t replace spaces in the url…!)

network.download( “http://www.crosstrainer.ca/playmate/”…string.gsub( downloadFile, "% ", “%%20”),
        “GET”,

Thanks for the reply, Greg

You didn’t include the “android” part in your post (could be the problem?), as in

settings

{
 android =
 {
  versionCode = “11”,
  usesPermissions =
   {
   “android.permission.INTERNET”,
   “android.permission.WRITE_EXTERNAL_STORAGE”,
   “android.permission.ACCESS_FINE_LOCATION”,
   “android.permission.ACCESS_COURSE_LOCATION”,
  },
 },

}

The full guide is at: http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

Hi mpappas,

It was actually a simple miss… I didn’t replace spaces in the url…!)

network.download( “http://www.crosstrainer.ca/playmate/”…string.gsub( downloadFile, "% ", “%%20”),
        “GET”,

Thanks for the reply, Greg