Hi Giga and Erel.
Thank you.
Did you try mnt/sdcard/Alarms?
When changing to that, it did not help.
also check the manifest.
Add the following line to the manifest file using the manifest editor:
< uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
when adding that Permission in the Manifest, it did help..
(both with the
"/sdcard/" path and the
"/mnt/sdcard/" one)
You should use File.DirRootExternal instead of /sdcard. The actual path is different on different devices and it will add the permission automatically.
This indeed also helped. When I changed it to:
O_Archiver.ZipFolder(File.DirRootExternal&"/Alarms/","/sdcard/","MyFirstZIP.zip","NoneForNow")
It worked.
(when using File.DirRootExternal, I do not need to add the Permission to the manifest..)
BTW
"DirRootExternal" sounds like the path to the external SD Card no?
In my case, I do not have an SD Card in the device,
but If I add one, will
File.DirRootExternal resolve to something else?
(if not, then, if
File.DirRootExternal="/mnt/sdcard", what will refer to the External Storage(SD Card) when it's available?)
Also it makes me wonder:
Archiver's
.ZipFolder() method does not include the needed permission?
File.DirRootExternal causes it to be included, so shouldn't
Archiver.ZipFolder() include it too?