J jnbarban Member Licensed User Longtime User May 23, 2011 #1 Hi , i use this code to open PDF file : Code: Copy Dim iIntent As Intent iIntent.Initialize(iIntent.ACTION_VIEW, File.DirInternal & "/Supports/" & sDossierVoulu) iIntent.SetType("application/pdf") StartActivity(iIntent) sDossierVoulu = "MonPDF.pdf" but this don't work . I Think that "File.DirInternal" not return a URI string if i try : Code: Copy iIntent.Initialize(iIntent.ACTION_VIEW, "file:///Supports/" & sDossierVoulu) it's ok... Do you know how to use " File.DirInternal" with iIntent.Initialize function ?
Hi , i use this code to open PDF file : Code: Copy Dim iIntent As Intent iIntent.Initialize(iIntent.ACTION_VIEW, File.DirInternal & "/Supports/" & sDossierVoulu) iIntent.SetType("application/pdf") StartActivity(iIntent) sDossierVoulu = "MonPDF.pdf" but this don't work . I Think that "File.DirInternal" not return a URI string if i try : Code: Copy iIntent.Initialize(iIntent.ACTION_VIEW, "file:///Supports/" & sDossierVoulu) it's ok... Do you know how to use " File.DirInternal" with iIntent.Initialize function ?
Erel B4X founder Staff member Licensed User Longtime User May 24, 2011 #2 It should be: Code: Copy Dim uri As String uri = "file://" & File.Combine(File.DirInternal, "Supports/" & sDossierVoulu) Upvote 0
It should be: Code: Copy Dim uri As String uri = "file://" & File.Combine(File.DirInternal, "Supports/" & sDossierVoulu)