Hi. When I click on an emailed file (*.f3a) my app automatically opens - I have the file association working fine
. I can also open the app by clicking on a .f3a file saved to my device. So I think I have the manifest file working ok.
My problem is reading the contents of the file.
The .f3a file is just a text file with 7 lines I wish to read into an array - I think using File.ReadList
My code errors at the File.ReadString - java.io.FileNotFoundException: No content provider: 0@media/external/file/38
And if I remove this line (its only a log), I get an error at File.ReadList.
How do I correctly find the directory and filename of a file used to open the app by association?
Sub Activity_Resume
Dim intent1 As Intent
intent1 = Activity.GetStartingIntent
If intent1 <> Null Then
Dim UriString As String = intent1.GetData
Dim Dir, FileName As String
If UriString.StartsWith("file://") Then
FileName = UriString.Substring("file://".Length)
Dir = ""
Else If UriString.StartsWith("content://") Then
FileName = UriString.Substring("content://".Length)
Dir = "ContentDir"
End If
Log(File.ReadString(Dir, FileName))
Dim List1 As List
List1 = File.ReadList(Dir, FileName)
Msgbox("List1.Size = " & List1.Size & CRLF & "The third item is: " & List1.Get(2), "")
End If
End Sub
Any help greatly appreciated! Thank you, Andrew