S Smee Well-Known Member Licensed User Longtime User Dec 24, 2011 #1 I have the following code Code: Copy Dim in As Intent in.Initialize(in.ACTION_VIEW, FileName) in.SetType("application/pdf") but when the code is executed i get a quick message saying that the program has stopped unexpectedly and it reverts back to my calling program Is there something i am missing? I can navigate to the file and it opens ok when i click on it in its directory so the file itself is ok UPDATE: IF I CHANGE THE Initialize line to the following it works in.Initialize(in.ACTION_VIEW, "file://" & File.Combine(File.DirDefaultExternal , "/Test.pdf")) What is wrong with the first line anybody? Last edited: Dec 24, 2011
I have the following code Code: Copy Dim in As Intent in.Initialize(in.ACTION_VIEW, FileName) in.SetType("application/pdf") but when the code is executed i get a quick message saying that the program has stopped unexpectedly and it reverts back to my calling program Is there something i am missing? I can navigate to the file and it opens ok when i click on it in its directory so the file itself is ok UPDATE: IF I CHANGE THE Initialize line to the following it works in.Initialize(in.ACTION_VIEW, "file://" & File.Combine(File.DirDefaultExternal , "/Test.pdf")) What is wrong with the first line anybody?
Erel B4X founder Staff member Licensed User Longtime User Dec 25, 2011 #2 What is wrong with the first line anybody? Click to expand... What is the value of FileName? Upvote 0
S Smee Well-Known Member Licensed User Longtime User Dec 26, 2011 #3 The filename being passed is File.DirDefaultExternal & "/Test.pdf" Upvote 0