LAMW - open existing file into a filestream (fmopenread - solved, android 10) lazarus / 43-Android ---------------------------------------------------------------------- Mongkey · 2021-05-18 06:11 Is there any method for opening exsisting file into stream format? ->Permission ->Newstream:=TFilestream.create('existing file a',fmopenread); ->error ---------------------------------------------------------------------- loaded · 2021-05-18 06:56 Quote from: Mongkey on May 18, 2021, 08:11:42 amIs there any method for opening exsisting file into stream format? LAMW is a blessing. Whatever you look for is there  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);begin if IsRu ntimePermissionGranted('android.permission.WRITE_EXTERNAL_STORAGE') = False then    Self.RequestRuntimePermission('android.permission.WRITE_ EXTERNAL_STORAGE',1001);end;  procedure TAndroidModule1.jButton1Click(Sender: TObject);var  Stream:TFileStream;  StreamFilePath: string; begin  if IsRuntimePermis sionGranted('android.permission.WRITE_EXTERNAL_STORAGE') then  begin  StreamFilePath:= Self.GetEnvironmentDirectoryPath(dirDownloads)+'/'+'123.mp4';    Stream:=TFileStream.Create(StreamFilePath,fmOpenRead or  fmShareDenyNone);    // You can use TReadBufStream to read at higher speeds. Ex: Fastspeedstream:=TReadBufStream.Create(Stream);    ShowMessage(inttostr(Stream.Size));    Stream.Free;  end  else  Showmessage('Sorry.. "WRITE_EXTERNAL_STORAGE"  DENIED ...');end; ---------------------------------------------------------------------- Mongkey · 2021-05-18 08:55 I wrote same script like yours -> failed   , may be need more coffee to find the solution. Have you try on android 10? ---------------------------------------------------------------------- loaded · 2021-05-18 16:39 I tried it on Android 8 and 11, it was working without any problems. As you said yes, there were 10 problems, but when I added the following parameter to the manifest file, it worked without any problems. 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 ---------------------------------------------------------------------- jmpessoa · 2021-05-18 17:52 @loaded Quotebut when I added the following parameter to the manifest file... Nice! I will update/fix LAMW manifest template! Thank you! ---------------------------------------------------------------------- Mongkey · 2021-05-19 02:36 , thanks, i forgot my apps was not ready for local sandboxing on android 10  i was also updated xml support provider path for android 10. it was very useful on android 10, for creating custom media database on sdcard from direct shoot camera, existing image etc. ---------------------------------------------------------------------- jmpessoa · 2021-05-19 16:07 Quotei was also updated xml support provider ... What LAMW file you changed? ---------------------------------------------------------------------- Mongkey · 2021-05-19 23:41 Res -> xml -> file provider setting This setting has deal with camera  or file access i not mistaken