AkuryuBR
Member
Hi, I have a problem with the following code, when I use it the phone asks me to choose which application to open the pdf file with, I select it and I get this
B4X:
Sub apri_pdf(fn As String, cartella As String)
File.Copy(File.DirInternal & "/" & cartella, fn, Starter.Provider.SharedFolder, fn)
Dim file_pdf As Intent
file_pdf.Initialize(file_pdf.ACTION_VIEW,Starter.Provider.GetFileUri(fn))
file_pdf.SetType("application/pdf")
file_pdf.WrapAsIntentChooser("Choose PDF Viewer") ' questa riga ti fa chiedere con che programmi vuoi aprirlo
StartActivity(file_pdf)
End Sub