I'm hoping someone can help me out. I've got a mobile application that I'm developing that first saves a report as a PDF on the server via an AJAX callback. That part works great. Then it runs the "Phonegap - open file with native application" in action javascript.
Screen1.jpg
The file to download is being generated via a javascript function because the file name being retrieved from the server will be different depending on the user logged in. I'm forcing the download to happen even if found on the device because I want it to overwrite any previous versions of the file. The download part works great. I can easily see the file on my device in the /storage/emulated/0/Android/data/com.yourcompany.myapp/cache/__AATEMPFILES folder. However, the file doesn't actually open up. I have Adobe reader installed on the device and that is the default application for PDF files. I can navigate to this folder in a file manager app and click the file and it opens up right away within Adobe. I'm just trying to get it to automatically open up so the user doesn't have to try to navigate to this long path. I tried putting a simple javascript alert in the On Success action. Nothing happens here. I also put in a simple alert on the On Error action and that produces that alert every time but the file is downloading, just not sure why it's not opening up the file that it downloaded.
Any suggestions?
FYI, I'm using Alpha 12.4.5.4.5, Build 5221 which is the latest version.
Any help would be greatly appreciated.
Thanks!
Screen1.jpg
The file to download is being generated via a javascript function because the file name being retrieved from the server will be different depending on the user logged in. I'm forcing the download to happen even if found on the device because I want it to overwrite any previous versions of the file. The download part works great. I can easily see the file on my device in the /storage/emulated/0/Android/data/com.yourcompany.myapp/cache/__AATEMPFILES folder. However, the file doesn't actually open up. I have Adobe reader installed on the device and that is the default application for PDF files. I can navigate to this folder in a file manager app and click the file and it opens up right away within Adobe. I'm just trying to get it to automatically open up so the user doesn't have to try to navigate to this long path. I tried putting a simple javascript alert in the On Success action. Nothing happens here. I also put in a simple alert on the On Error action and that produces that alert every time but the file is downloading, just not sure why it's not opening up the file that it downloaded.
Any suggestions?
FYI, I'm using Alpha 12.4.5.4.5, Build 5221 which is the latest version.
Any help would be greatly appreciated.
Thanks!