kepler Active Member Licensed User Longtime User Mar 29, 2015 #1 Hi, Good evening. I've done a Java Lib to be used in B4A as an help accessory. Now, my problem is this: the java lib must read a set of files. I can pass, I think, the path to the lib through B4A. But where do I place the files? Is it in the Files Folder inside the B4A project? Will they be added to the project when compiled? And, in that case, what is the correct path to provide to the lib? Is it: File.DirDefaultExternal & "/Files/" or just File.DirDefaultExternal or other ? I'm a little mixed up here...Sorry. Kind regards, Kepler
Hi, Good evening. I've done a Java Lib to be used in B4A as an help accessory. Now, my problem is this: the java lib must read a set of files. I can pass, I think, the path to the lib through B4A. But where do I place the files? Is it in the Files Folder inside the B4A project? Will they be added to the project when compiled? And, in that case, what is the correct path to provide to the lib? Is it: File.DirDefaultExternal & "/Files/" or just File.DirDefaultExternal or other ? I'm a little mixed up here...Sorry. Kind regards, Kepler
DonManfred Expert Licensed User Longtime User Mar 29, 2015 #2 http://en.lmgtfy.com/?q=android+java+path+to+assets Upvote 0
kepler Active Member Licensed User Longtime User Mar 29, 2015 #3 Hi, I've just made a test.... I putted a file in the Files folder of my project, Test.txt, and compiled it. In the code, I placed the code: Code: Dim fname As String = File.DirDefaultExternal Msgbox(fname,"Info") If File.Exists(fname, "Test.txt") Then Msgbox("It's there!!!","Info") End If I don't receive the message "It's here!!!" - just the different paths. I've tryed also DirRootExternal without luck... Now, can someone tell me where's my file? Was it included in my project? Kind regards, Kepler Upvote 0
Hi, I've just made a test.... I putted a file in the Files folder of my project, Test.txt, and compiled it. In the code, I placed the code: Code: Dim fname As String = File.DirDefaultExternal Msgbox(fname,"Info") If File.Exists(fname, "Test.txt") Then Msgbox("It's there!!!","Info") End If I don't receive the message "It's here!!!" - just the different paths. I've tryed also DirRootExternal without luck... Now, can someone tell me where's my file? Was it included in my project? Kind regards, Kepler
DonManfred Expert Licensed User Longtime User Mar 29, 2015 #4 kepler said: in the Files folder of my project Click to expand... The Files-Folder is your Assets-Folder so you need to check Code: Dim fname As String = File.DirAssets Msgbox(fname,"Info") If File.Exists(fname, "Test.txt") Then Msgbox("It's there!!!","Info") End If Upvote 0
kepler said: in the Files folder of my project Click to expand... The Files-Folder is your Assets-Folder so you need to check Code: Dim fname As String = File.DirAssets Msgbox(fname,"Info") If File.Exists(fname, "Test.txt") Then Msgbox("It's there!!!","Info") End If
kepler Active Member Licensed User Longtime User Mar 29, 2015 #5 Hi Don, Well, the file is there. But I can't get it - the message box tells nothing. Maybe the file isn't being packed and installed with my program? Kepler Upvote 0
Hi Don, Well, the file is there. But I can't get it - the message box tells nothing. Maybe the file isn't being packed and installed with my program? Kepler