Yes, i already know,
data/data/appname/files it can be readed only by the owner app or by any app with root.
BUT, this is actually not true, for example, the outlook app, when you open a email with attachments, this files are stores in a folder under
file:///data/data/com.microsoft.office.outlook/
Then, a chooser will appear to open the file, for example, WPS office, and those apps CAN READ the file from the private
data/data folder (you can click on file info to see the path)
So, I added the Intent Filter on my app to read XML files, and its working great for any location but /data/data.
This app worked with the hotmail app that saved the attacments on the publick doenloads folder.
When i click a XML file on the Outlook app, my app opens and the intent data is correct (file:///data/data/com.microsoft.office.outlook/app_1-1%253AKgDirMsBwsNWyd0aRctGLQ/SEP210905778.282.1.X.cfdi.xml), but the file.exists function returns false.
Sub Activity_Resume
Dim XmlData As String
Dim XmlPath As String
Dim XmlFile As String
Dim In As Intent
In = Activity.GetStartingIntent
If In <> Null Then
XmlData = In.GetData
If XmlData <> Null Then
XmlPath = XmlData.SubString2(0,XmlData.LastIndexOf("/"))
XmlPath = XmlPath.Replace("file:///","")
XmlFile = XmlData.SubString(XmlData.LastIndexOf("/")+1)
If File.Exists(XmlPath, XmlFile) = True Then
Log(File.GetText(XmlPath, XmlFile)) 'this works on otrher paths
Else
Log("ERROR")
End If
End If
End Sub
Any ideas on this?
thanks