Hello,
I have the following little snippet of code:
Sub mniWLst_Click
Dim fn As String
Dim nt As Intent
fn = "file://" & File.Combine(apVals.dir, apVals.wfile)
nt.Initialize(nt.ACTION_EDIT, fn)
nt.SetType("text/plain")
StartActivity(nt)
End Sub
I want to open a text file in the default editor.
AppVals.dir is either File.DirDefExternal or File.DirInternal if the device has no SD card.
This code works as intended using DirDefExternal, but fails when DirInternal is used. The error message displayed by the chosen text editor program is "File Load Error" or "please insert SD card" depending on the editor chosen.
In both cases, DirDefExternal and DirInternal, fn looks correct and the file is loaded and used within the program using the same location.
I am guessing the error has something to do with directory privileges - DirInternal cannot be accessed by the text editing program.
Am I guessing correctly? Is there a way around this?
Thanks,
Barry.