Recent

Author Topic: (LAMW) SOLVED jDownloadManager savefile error on android 10  (Read 1786 times)

Mongkey

  • Full Member
  • ***
  • Posts: 214
(LAMW) SOLVED jDownloadManager savefile error on android 10
« on: January 27, 2022, 05:03:15 am »
I found not proper savetofile on jdownloadmanager. It always has name -> "Downloading...[filename.extension]", not filename.extension, thank you.
« Last Edit: January 31, 2022, 07:18:24 am by Mongkey »

Mongkey

  • Full Member
  • ***
  • Posts: 214

jmpessoa

  • Hero Member
  • *****
  • Posts: 2111
Re: (LAMW) jDownloadManager savefile error on android 10
« Reply #2 on: January 28, 2022, 05:37:02 am »
from here:
https://forum.lazarus.freepascal.org/index.php/topic,21919.1230.html

[Maybe can help you...]

Quote
Developers no longer have access to a file via its path. Instead, you need to use via “Uri“.

New!   jForm methods:

 //get user permission... and an uri
RequestCreateFile
RequestOpenFile
RequestOpenDirectory
TakePersistableUriPermission

 //handling file by uri....
 function GetFileList                   [edited....]
 function GetBitmapFromUri
 function GetTextFromUri
 procedure SaveImageToUri
 procedure SaveTextToUri

New demo:
"AppPublicFoldersAccessDemo1"
« Last Edit: February 01, 2022, 08:39:50 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Mongkey

  • Full Member
  • ***
  • Posts: 214
Re: (LAMW) jDownloadManager savefile error on android 10
« Reply #3 on: January 30, 2022, 03:03:10 pm »
I did it in other way, dowloading via chrome using intent  :), it solve my problem. Thank you, but i 'll try your way, by the way since i using arm with -soft chipset, i do not need create all my form on main form in on create, i can create form every where i want, thank you.

 

TinyPortal © 2005-2018