Get files to load with install of app

sheriffporter

Member
Licensed User
Longtime User
Sorry if this is covered somwhere, couldn't find it searching docs...

I have an app that needs to reference a .txt file for settings. I understand how to have it check for if file.exists, and create it if it does not. Where can I put my default .txt file so it will go with the .apk install and end up in the DirAssets directory so I can open it? Hope that makes sense..

Example: ,
When this fails on a new install which it does obviously:

If File.Exists(File.DirRootExternal, "number.txt") Then

I need be able to copy the default settings file from somewhere (DirAssetts I think?) but how do I get it to be there when the .apk is installed?

So that this statement will work:

File.Copy(File.DirAssets, "Number.txt", File.DirRootExternal, "Number.txt")



Michael
 

stevel05

Expert
Licensed User
Longtime User
Use the Add Files button in the Files Tab (Bottom right of the IDE between Modules & Logs). The file should then be available to copy from File.DirAssets.
 
Upvote 0
Top