assets\files not accessible lazarus / 43-Android ---------------------------------------------------------------------- cbsistem · 2020-02-21 02:21 files in the assets folder are not accessible in the assets folder contains: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i assets\databases\myData.dbassets\test.txt when the apk is generated the files are all inside it. when you run the application I can't access these files. I tried to use this code and it doesn't work Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.jButton1Click(Sender: TObject);var  pathToDB: string;begin   pathToDB:=Self.GetEnvironmentDirectoryPath(dirDatabase);      if FileExists( pathToDB + '/' + 'myData.db' ) then   //  not found     ShowMessage('file exists');end; Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i pathToDB:=GetFilePath(fpathApp);                            //    /dat a/app/org.lamw.applamwproject1- 2/base.apkpathToDB:=Self.GetEnvironmentDirectoryPath(dirDatabase);    //    /data/user/0/org.lamw.applamwproject1/database pathToDB:=GetFil ePath(fpathData);                          //     /data/user/0/org.lamw.applamwproject1/filesif FileExists(pathToDB+'/test.txt') then                  //  not found    jListView1.LoadFromFile('test.txt'); ---------------------------------------------------------------------- cbsistem · 2020-02-21 13:34 One thing I identified was: IT IS NOT JUST JUST PLACING THE FILE NOVA_IMAGEM.PNG in the ASSETS folder, I needed to put it inside an ImageList so it will be available and be identified by the code below Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i      pathToDB: = GetFilePath (fpathData) + '/ test2.png';     if self.FileExists (pathToDB) then        ShowMessage ('exists test2.png');  probably the same should happen with databases\myData.db no folder just put it inside it must be linked to the component. but what I need is to send a list of files, which can be HTML, JavaScript, Images the questions are: It is mandatory to link files to a component. How could I send these files? ---------------------------------------------------------------------- cbsistem · 2020-02-21 15:26 SORTED OUT the files in the assets folder are not visible to the FileExists method Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.AndroidModule1JNIPrompt(Sender: TObject);   var    i: integer;    _FilesList:TStrings;    _pathTo, _file:string;  begin    //makes files in the assets folder accessible via the FileExists method   _pathTo:=GetFilePath(fpathData);   _FilesList:=TStringList.Create;   _FilesList.Add('teste.txt');    //add your files from the assets folder     for i:= 0 to _FilesList.Count - 1 do    begin       _file:=Trim(_FilesList.Strings[i]);       if _file <> '' then       begin          if not FileExists(_pathTo+'/'+_file) then          Asset_SaveToFile(_file,_pathTo+'/'+_file);       end;    end;end;