C cgalvizu Member Licensed User Longtime User Feb 7, 2013 #1 Dear all: I am having a problem and require your help: I am trying to download a file and save it in the sd card (directly connected to the devive via USB): DownloadService.Target = File.OpenOutput(DummyVar , fileName, False) where newConfigurationID = "2" DummyVar = File.DirRootExternal& "/" & newConfigurationID I am getting the error: java.io.FileNotFoundException: mnt/sdcard/2/epc.mp4 (Invalid Argument) previously I created that directory with: File.MakeDir(File.DirRootExternal , newConfigurationID) any suggestions?
Dear all: I am having a problem and require your help: I am trying to download a file and save it in the sd card (directly connected to the devive via USB): DownloadService.Target = File.OpenOutput(DummyVar , fileName, False) where newConfigurationID = "2" DummyVar = File.DirRootExternal& "/" & newConfigurationID I am getting the error: java.io.FileNotFoundException: mnt/sdcard/2/epc.mp4 (Invalid Argument) previously I created that directory with: File.MakeDir(File.DirRootExternal , newConfigurationID) any suggestions?
Erel B4X founder Staff member Licensed User Longtime User Feb 7, 2013 #2 I recommend you to use HttpUtils2 to download the file. I guess that you are not waiting for the FinishDownload event. Upvote 0
I recommend you to use HttpUtils2 to download the file. I guess that you are not waiting for the FinishDownload event.
C cgalvizu Member Licensed User Longtime User Feb 8, 2013 #3 Invalid Argument in OpenOutput Thanks Erel for your response. In fact if I change the second argument in OpenOutput for a constant instead of a variable it works fine. Any sugestions? Upvote 0
Invalid Argument in OpenOutput Thanks Erel for your response. In fact if I change the second argument in OpenOutput for a constant instead of a variable it works fine. Any sugestions?
C cgalvizu Member Licensed User Longtime User Feb 9, 2013 #4 Problem with the second argument in OpenOutput Anybody has an idea why I am getting InvalidArgument when I use a variable in the filename of OpenOutput? If I use the name of the file File.OpenOutput( File.DirRootExternal,"image.png",False) it works fine If I use a variable with the name of the file File.OpenOutput( File.DirRootExternal,filename,False) it doesnt work! Thanks in advance. Upvote 0
Problem with the second argument in OpenOutput Anybody has an idea why I am getting InvalidArgument when I use a variable in the filename of OpenOutput? If I use the name of the file File.OpenOutput( File.DirRootExternal,"image.png",False) it works fine If I use a variable with the name of the file File.OpenOutput( File.DirRootExternal,filename,False) it doesnt work! Thanks in advance.
thedesolatesoul Expert Licensed User Longtime User Feb 9, 2013 #5 do log(filename) before, to see what is in it Upvote 0