Titanium Mobile 3.1.2 on Android: I'm allowing other apps to open a PDF file in my app. I process the incoming file like this:
var intent = Ti.Android.currentActivity.getIntent(); if (intent && intent.data) { var URL = intent.data; var file = Ti.Filesystem.getFile(URL); if (file.exists()) { alert("Sucess"); } }This works when I open a file from the Downloads folder. However, I have noticed that if I open a file from the Gmail app,
intent.data
is set to a valid URL, but file.exists()
is set to false. Why is this happening?