Problem with file location on external disk

fdx12345

Active Member
Licensed User
Longtime User
I have declared a string called Storage and set it to File.DirDefaultExternal. In my application that works out to be /storage/sdcard0/Adroid/data/com.B4a.RBudget/files.

When I compile the program in debug mode and load the compiled file, it works fine.

If this is first time run, a couple of data files are copied from Dir.Assets to the target directory of File.DirDefaultExternal which equals the above.

I have looked in the data file using a file explorer on the phone and the data is there at the correct location which in my case is com.B4a.RBudget.

However, if I exit the program and re-run it, the program cannot find the file because something in the program is looking for a directory called b4a.budget , not finding it, has created a new directory called b4a.budget and copied the default files into it from DirAssets. Now the program wants to use that directory.

If I recompile the program (all of this is done in debug mode) and reload it, it is back to using the correct directory.

My package name is com.B4a.RBudget.

Could the com part of the com.B4a.Rbudget be causing the problem? If so, why want it mess up under the debugger?
 

fdx12345

Active Member
Licensed User
Longtime User
tried changing the package name, same problem

I changed the package name to just B4a.RBudget but the problem still exist. The program wants to use B4a.Budget.

I am at a stand still until I can figure out what needs to be changed. Possibly some thing related to the package itself, but I am only given the option to change the package name.
 
Upvote 0

fdx12345

Active Member
Licensed User
Longtime User
Found the problem

I had used the same icon for the present program as I did for a previous version using a different table and I was trying to run an the old program against the new. When I went direct from accepting to loading the program from the debugger, I was using the new version but when I used the icon on the phone, it was pointing at an old version.

Corrected everything by deleteing all version off the phone. Now only the new version is on the phone.
 
Upvote 0
Top