|
fdelete/frename do not work |
Started by Luis DEVIS DABAN, Jun., 29 2017 6:51 PM - 2 replies |
| |
| | | |
|
| |
Registered member 18 messages |
|
Posted on June, 29 2017 - 6:51 PM |
I use Windev mobile v 20.
I'm accessing to the phone SD card folder from my PC (windows10) and put via USB a file that has to be read by my Android App. After reading the file my App has to delete it.
Problems:
I use two diferent devices o phones
In one of them everything works fine, the sdcard is detected as sdcard1 (using SysDirStorageCard() ) and the file can be read, deleted or even renamed.
In the other device, WITH THE SAME CONFIGURATION, SysDirStorageCard() returns sdcard0 and I have to use manually the name sdcard1 to be able to read the files sent from my PC via USB. Besides the fdelete(), frename() functions do not work, they just do not give any error but don't delete nor rename the file either.
Any idea on what's wrong?
Thankyou Thankyou Thankyou Thankyou |
| |
| |
| | | |
|
| | |
| |
Posted on June, 30 2017 - 1:17 AM |
Hi Luis,
the permissions scheme used in android has changed with time, so this kind of problems is quite frequent...
Use google to have a better idea and find if there is any place where the permissions are the same in all versions of android, as that may not be the case.
I prefer to go around this kind of problems by using a different method: the app is requesting the needed file from a server using ftp, http, or even sockets, then writes the file down if needed inside it's protected area (ie the work/current directory) or process the data directly without even writing it.
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source)
More information on http://www.fabriceharari.com
Le 6/29/2017 à 10:51 AM, Luis DEVIS DABAN a écrit :
I use Windev mobile v 20.
I'm accessing to the phone SD card folder from my PC (windows10) and put via USB a file that has to be read by my Android App. After reading the file my App has to delete it. Problems:
I use two diferent devices o phones In one of them everything works fine, the sdcard is detected as sdcard1 (using SysDirStorageCard() ) and the file can be read, deleted or even renamed.
In the other device, WITH THE SAME CONFIGURATION, SysDirStorageCard() returns sdcard0 and I have to use manually the name sdcard1 to be able to read the files sent from my PC via USB. Besides the fdelete(), frename() functions do not work, they just do not give any error but don't delete nor rename the file either.
Any idea on what's wrong?
Thankyou Thankyou Thankyou Thankyou |
| |
| |
| | | |
|
| | |
| |
Registered member 18 messages |
|
Posted on June, 30 2017 - 4:17 PM |
Thank you Fabrice, Actually the versions of Android are not exactly the same, not too different but could be the cause. I'll have a look into that.
Thank you very much. |
| |
| |
| | | |
|
| | | | |
| | |
|