Lazarus

Programming => Operating Systems => Android => Topic started by: Mongkey on January 27, 2022, 05:03:15 am

Title: (LAMW) SOLVED jDownloadManager savefile error on android 10
Post by: Mongkey 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.
Title: Re: (LAMW) jDownloadManager savefile error on android 10
Post by: Mongkey on January 28, 2022, 04:44:54 am
https://stackoverflow.com/questions/59177136/downloadmanager-not-working-for-android-10-q

but i do not know how to fixed it  ::)
Title: Re: (LAMW) jDownloadManager savefile error on android 10
Post by: jmpessoa 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"
Title: Re: (LAMW) jDownloadManager savefile error on android 10
Post by: Mongkey 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