Android Question Open a file with his application

You cannot open the file in Dir.Assets, but you can copy it first to File.DirDefaultExternal or File.DirRootExternal. Note file name in lowercase like: myfile.ext. See below code:
Code: Copy
Dim i As Intent
If File.Exists(File.DirDefaultExternal,"help0.pdf")=False Then  
        File.Copy(File.DirAssets,"help0.pdf",File.DirDefaultExternal,"help0.pdf") 'file name in lowercase
End If
i.Initialize(i.ACTION_VIEW, "file://" & File.DirDefaultExternal & "/help0.pdf")
i.SetType("application/pdf")
StartActivity(i)
 
Upvote 0
Back
Top