-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On Android the file isn't create #5
Comments
Thanks for the console log entries @szanellato93. They appear to show that service is actually building the report file. I know there are are (3) lines that report out errors, but this is a bug in my code. If you check out the lines in source that print these to console, you can see I call "console.error" where I should call "console.log". I will work on fixing those today. So, my guess is that that file was correctly written, but perhaps the File plugin is failing to load the pdf for viewing. Part of the problem could be the lack of built-in PDF viewing in the Android platform. The iOS platform has PDF viewing built into the browser, so it works out-of-the-box. Perhaps you need to install a PDF viewer on your Android test platform? Is it an emulator or a physical device? Also, can you browse the file system on the test platform and find the created file (rptSample.pdf)? This will help to troubleshoot if it is PDF creation or PDF viewing. |
Similar problem but I could find the file on the test Android device, will you be able to fix this? |
There appears to be a bug in my code on the call to hideLoading on line 46 Try changing the call to use _hideLoading(); Or, you could rename the I think I made some changes to the library and broke this a little while The only other note is the possible need to whitelist the file type. I https://www.npmjs.com/package/cordova-plugin-whitelist On Wed, Oct 26, 2016 at 10:59 AM, Ola notifications@github.com wrote:
|
I tried using another means while yours gets fixed, slightly off-topic but |
The issue is probably a plugin problem. I just posted on your SO post. -Jeff On Thu, Oct 27, 2016 at 12:07 PM, Ola notifications@github.com wrote:
|
I have a problem with this plugin. On iOS all work well, but on Android probably my pdf isn't created. I receive a blank page when it is opened. And with some try to attach it to a email, it dosn't work. I post here my console log:
2 332189 log SaveFile: requestFileSystem
3 332481 error SaveFile: gotFS --> getFile
4 332501 error SaveFile: gotFileEntry --> (filePath) --> createWriter
5 332518 error SaveFile: gotFileWriter --> write --> onWriteEnd(resolve)
6 332666 log report run on device using File plugin
7 332670 log ReportCtrl: Opening PDF File (file:///data/data/com.ionicframework.ambra611013/cache/rptSample.pdf)
plugin installed:
cordova-plugin-console 1.0.2 "Console"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-file 4.1.1 "File"
cordova-plugin-file-opener2 2.0.2 "File Opener2"
cordova-plugin-inappbrowser 1.2.1 "InAppBrowser"
cordova-plugin-splashscreen 3.1.0 "Splashscreen"
cordova-plugin-statusbar 2.1.1 "StatusBar"
cordova-plugin-whitelist 1.2.1 "Whitelist"
de.appplant.cordova.plugin.email-composer 0.8.2 "EmailComposer"
ionic-plugin-keyboard 1.0.8 "Keyboard"
The text was updated successfully, but these errors were encountered: