Sharing component error on samsung a71 but on realme c17 work perfect

Hello
im build app generate pdf from layout screen & save into internal storage , and the file send via sharing component…

its work perfect on realme c17 which is use android 10
but when my app test on samsung a71 its not work…on sharing component cause my pdf file its not found…& im check the file is nothing in file:///storage/emulated/0/ directory…

im attach my codeblock
thank you



Capture2

On Android 11+ you can no longer access non-media files outside of the Shared folders or the ASD. In addition, in order to be able to access such non-media files in the Shared folders, these must have been created by the app itself.

Otherwise you have to use SAF.

See also here:

1 Like

ok thanks i have follow your instruction and the result is still…not work .

My app pacakge name :io.kodular.hendra_sw.agra_solution_absen_samsung
my save path : file:///storage/emulated/0/Android/data/io.kodular.hendra_sw.agra_solution_absen_samsung/files/absen.pdf



thank you i will try

HAI @bodymindpower

thanks for the advise…its work great on my app
on android 11 my old pdf extension its not work…so im use the latest pdf extension from your link above,and the result its work …cause from the latest extension , its attached with ASD directory…

& i can use it for fill address to sharing pdf …& its work great too

thanksssss