derez Expert Licensed User Longtime User Nov 21, 2010 #1 I'm trying to create a file in the sdcard using textwriter.initialize, but get an error about permissions, probably it is read only. Does anyone know how to enable file creating on the sdcard of an emulator ? Using push command I can send files to a directory but not by the code. I don't know if this problem happens with a real device.
I'm trying to create a file in the sdcard using textwriter.initialize, but get an error about permissions, probably it is read only. Does anyone know how to enable file creating on the sdcard of an emulator ? Using push command I can send files to a directory but not by the code. I don't know if this problem happens with a real device.
Erel B4X founder Staff member Licensed User Longtime User Nov 21, 2010 #2 How do you get the sdcard folder? You should use File.DirRootExternal. Upvote 0
derez Expert Licensed User Longtime User Nov 21, 2010 #3 I made the folders " manually" using andexplorer, and use them for User files: Code: Copy tr.Initialize(File.OpenInput("sdcard\Nivut\User", name)) I can read the directory and files but can't create them. Must I use the File.DirRootExternal folder ? Upvote 0
I made the folders " manually" using andexplorer, and use them for User files: Code: Copy tr.Initialize(File.OpenInput("sdcard\Nivut\User", name)) I can read the directory and files but can't create them. Must I use the File.DirRootExternal folder ?
Erel B4X founder Staff member Licensed User Longtime User Nov 21, 2010 #4 Must I use the File.DirRootExternal folder ? Click to expand... Yes. It will set the permissions as required. Code: Copy tr.Initialize(File.OpenInput(File.DirRootExternal & "/Nivut/User", name)) Note that on some devices the external storage may be named differently, so it is better to use it anyway. Upvote 0
Must I use the File.DirRootExternal folder ? Click to expand... Yes. It will set the permissions as required. Code: Copy tr.Initialize(File.OpenInput(File.DirRootExternal & "/Nivut/User", name)) Note that on some devices the external storage may be named differently, so it is better to use it anyway.