Android file structure explorer lazarus / 43-Android ---------------------------------------------------------------------- iru · 2020-10-13 04:55 Gentlefolk, Trying to develop a small application on LAMW with Laz. Test and debug on a Nokia 4.2 (Android 10). Latest LAMW. GUI is all Ok, buttons/views/etc getting sorted. My problem is accessing a file in the Android environment. From a couple of the demos I have tried self.GetEnvironmentDirectoryPath, self.GetInternalAppStoragePath but cannot read/write a file. Then I have problems with checking the Android file structure, can anyone:   Recommend an android 'file explorer' which will give me an unambigous 'text' listing of the file structure rather than the pretty 'icon' type which seem to display by category/etc.   Direct me to a good working example of writing a file. Any suggestions, help appreciated, Ian. ---------------------------------------------------------------------- DonAlfredo · 2020-10-13 06:12 You might need this: 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  manifestPermissions: TDynArrayOfString;begin  //https://www.captechconsulting.com/blogs/runtime-permissions-best- practices-and-how-to-gracefully-handle-permission-removal  //https://d eveloper.android.com/guide/topics/security/permissions#normal- dangerous  if  IsRuntimePermissionNeed() then   // that is, target API >= 23  begin    if IsRuntimePermissionGranted('android.permission.CAMERA') and       IsRu ntimePermissionGranted('android.permission.WRITE_EXTERNAL_STORAGE') then    begin      //ShowMessage('Good ... we have runtime permissions !');    end    else    begin      ShowMessage('warning: Requesting Runtime Permission.... please, wait..');      SetLength(manifestPermissions, 2);       manifestPermissions[0]:= 'android.permission.CAMERA';  //from AndroodManifest.xml      manifestPermissions[1]:= 'android.permission.WRITE_EXTERNAL_STORAGE'; //from AndroodManifest.xml       Self.RequestRuntimePermission(manifestPermissions, 1101);       SetLength(manifestPermissions, 0);    end;  end;end; procedure TAndroidModule1.AndroidModule1RequestPermissionResult(  Sender: TObject; requestCode: integer; manifestPermission: string;  grantResult: TManifestPermissionResult);begin   case requestCode of   1101:begin            if manifestPermission = 'android.permission.CAMERA' then            begin                {              if grantResult = PERMISSION_GRANTED  then                  ShowMessage('Success! ['+manifestPermission+'] Permission grant!!! ' )                else  //PERMISSION_DENIED                   ShowMessage('Sorry... ['+manifestPermission+'] DENIED... ' );              }            end;             if manifestPermission = 'android.permission.WRITE_EXTERNAL_STORAGE' then            begin              {                if grantResult = PERMISSION_GRANTED  then                 ShowMessage('Success! ['+manifestPermission+'] Permission grant!!! ' )                else  //PERMISSION_DENIED                 ShowMessage('Sorry... ['+manifestPermission+'] Permission not grant... ' );                }            end;     end;  end;end; ---------------------------------------------------------------------- DonAlfredo · 2020-10-13 06:16 As a file browser on Android, I would like to recommend "Total Commander". ---------------------------------------------------------------------- iru · 2020-10-13 19:41 Total commander is great, I can see the 'real' world.  Getting there with file permissions.... Thanks, Ian.