Hi!
I would like to open a PDF on Adobe Reader but everytime Adobe opens, there is this message: 'Can not open open file'
I checked directory file, filename and I can open the file directly by Adobe.
I don't see a mistake in my code
B4X:
Dim PdfIntent As Intent
PdfIntent.Initialize(PdfIntent.ACTION_VIEW,File.Combine(DestDT,DT)) PdfIntent.SetComponent("android/com.android.internal.app.ResolverActivity")
PdfIntent.SetType("application/pdf")
StartActivity(PdfIntent)
Sub OpenPDF(filename As String)
Dim i As Intent 'Requires a reference to the Phone library
i.Initialize(i.ACTION_VIEW, filename)
i.SetType("application/pdf")
'i.WrapAsIntentChooser("Choose PDF Viewer")
StartActivity(i)
End Sub
B4X:
Dim folder As String
folder=File.DirRootExternal & "/nem"
Dim filename As String
If Position = 0 Then
filename = "nem001" & Country & ".pdf"
OpenPDF("file://" & File.Combine(folder, filename))