Hi for show pdf befor api 24 i have used this code:
B4X:
Dim iPdf As Intent
Dim folder As String
folder=File.DirRootExternal & "/.PDF"
Dim filename As String
Filename = MyPDF.PDF
iPdf.Initialize(ii.ACTION_VIEW, ( "file://" & File.Combine(folder, filename)))
' i have tried also with
' iPdf.Initialize(ii.ACTION_VIEW, ( "content://" & File.Combine(folder, filename)))
iPdf.SetType("application/pdf")
'iPdf.WrapAsIntentChooser("Choose PDF Viewer")
StartActivity(iPdf)
Thank's Erel
i have just solved.
But i have a question.
the FileProvider clear the file after used it?
is there a way to clean up every file used by fileprovider?
thank's
You can delete the file in Activity_Resume. However it doesn't sound like the best idea. If these are temporary files then keep the last x files and delete all other files.