I have an ionic app using angular-pdf-viewer, with pdf.js , to display pdf documents from a url. The viewer works on android devices and IOS devices with IOS 9 but as on IOS 10 the pdf will not show. Anyone else had a similar problem ?
So I eventually found that I needed to move this line out of the if statement so that it is always run: PDFJS.disableRange = true; It seems to all be working fine now for anyone experiencing the same issue.
I was facing the same issue. And I found out it is PDFJS's compatability issue. Workaround for this issue is, you can set
PDFJS.disableRange = true;
i.e you are bounding to download the whole file instead in chunks without detecting the device.
Please comment someone else has still an issue, even after this workaround.
Related
I have created one ionic app it runs perfectly fine in browser but when I convert it into app it gives white screen.
I have already install white list plugin and allowed all url in config and also have kept meta tag. Am not able to find any other solution.
When kept simple html file am able to view it.
Any help will be grateful.May be good way to debug will be also good.
Connect your phone to PC with USB cable and remember to keep USB Debugging On. Now, navigate to chrome://inspect. You'll find the device name and click on "inspect". On Console tab, the error list will give you a hint about what is wrong there.
In my case, a custom service was Injected in controller which had been removed at some time as It was not used anywhere.
Ok just answering this question so it will be helpful to all.
Below blog was helpful for me that how I can debug
http://gonehybrid.com/how-to-debug-the-white-screen-of-death-in-your-ionic-app/
And guess what was issue, folder name in app is case sensitive. I was just need to change a folder name as per exact case sensitive path I provide in index file.
Mostly such thing occures because of a javascript error. You say it runs in your browser. Are there some exception in the console?
Not everythings is equal between browser and device, for example plugins. You have to be sure, that all used plugins are installed properly.
If you deploy on android, you can use android monitor to get console output. On ios xcode has already an integrated debugger.
I had this horrible issue because I compiled my Android application with Cordova 6.x and the project worked with CrossWalk plugin. In my case, the solution was uninstalling Crosswalk. If your project has installed that plugin, try to uninstall it and compile your project again.
I've someone please could provide some workaround for this one?
If I run my IONIC application in IE9, i'm getting the error back:
Unable to get value of the property 'indexOf': object is null or
undefined ionic.bundle.min.js, line 6, character 31181.
When viewing the JS file. The exact line is:
var o=t.CSS.TRANSITION.indexOf('webkit');
Did somebody encountered this problem? Or has a fix for it?
I know that IONIC is meant for hybrid mobile dev, but I really need to get this working on IE9 also.
If you want it to be viewable in a browser for testing, then Chrome or Safari work just fine.
Support for IE desktop is not on the road map. Ionic's mission is hybrid apps.
http://ionicframework.com/docs/guide/preface.html119
Having very inconsistent results in viewing PDFs on the iPad Air (ios 7.1.1). Memory consumption and CPU usage doesn't seem to be an issue. Getting black boxes and sometimes app crashes when viewing PDFs. Also it doesn't happen on the iOS simulator, but only the actual iPad.
Heres some screen shots.
This is how I'm opening the PDFs (using angular):
$scope.openPDF = function(pdfName) {
var ref = window.open('img/pdfs/' + pdfName + '.pdf', '_blank', 'location=no');
};
Also, it seems like others are experiencing this problem.
https://discussions.apple.com/message/24129741#24129741
https://discussions.apple.com/message/23480067#23480067
Any direction would be much appreciated.
EDIT: This is still an issue. inAppBrowser does not fully garbage collect memory on PDFs
Apparently this is related to an HTML5 Video memory leak bug.
inAppBrowser does not do garbage collection properly if an video tag exists on the page. Ended up removing the tags and everything seems to be working properly.
I also ended up using an inAppBrowser Extension plugin for some of the extra options, it seems like all the options from the official plugin are still supported which is nice.
I initially filed a ticket and closed it.
This is the thread where the HTML5 Video tag leak is discussed.
From my research I cam to the same conclusion as #ChristopherMarshell that it is to do with a HTML5 video tag memory leak. Instead of using inAppBrowser to do the PDF document you could use Google docs, similar to:
window.open('https://docs.google.com/viewer?url=http://www.example.com/test.pdf&embedded=true', '_blank', 'location=yes');
This opens the PDF in Google docs and you shouldn't get any black boxes :)
EDIT :
This morning i've test it with iphone 4 and its working perfectly so its probably specific on Android (i'm using Version 4.1.2) Vs AsyncUpload Control
I am currently creating a file upload section on a web page that can be view on every type of device (Computer, Tablets and mobile phone). When i test the file upload section on a standard computer everything works perfectly. When i test it on mobile phone (I'm using Samsung Galaxy S2 with all the latest update) i have access to the files on my phone. I can select the file that i want and it seems to upload perfectly ( I got the green dot from the telerik control which means that the upload has been successful ) but in fact the file created in the template directory of the control ( app_data\RadUploadTemp ) has a size of 0 bytes. So when i press my submit button, the file copied in my working directory is invalid and cannot be read. You can test it yourself on a telerik demo page.
http://demos.telerik.com/aspnet-ajax/asyncupload/examples/additionalfields/defaultcs.aspx
When i upload a file on this page from my mobile phone, the file size is always 0... So from there i know that its not something with my code but its something between the control and the mobile browser.
I have asked my question on telerik forum but i didn't get any answer yet.
Does someone know if there is a limitation from mobile browser to upload file using RadAsyncUpload control
And by the way, RadAsyncUpload control use the html5 File API first, if the browser cannot use it, the control will try to use flash/silverlight. if its still not working, it will use standard IFrame module to upload the file.
Here are some docs about the control http://www.telerik.com/help/aspnet-ajax/asyncupload-overview.html
I would like to know if someone else can test it on the demo page and let me know if it works. If not , anyone have an alternative solution to upload file from mobile phone ?
Thanks !
Sebastien
Here is the code to solve the problem on Android. i was not able to put it in my comment.
Telerik.Web.UI.RadAsyncUpload.Modules.Flash.isAvailable = function () { return false; };
Telerik.Web.UI.RadAsyncUpload.Modules.FileApi.isAvailable = function() {return false; };
Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable = function() {return false; };
I just added a kind of If (android) do the code
Cheers !
I created a video player using Silverlight (mediaElement) and it works fine with IE in Windows. Now, I am trying to get that same stuff to work on the Mac. So, in my Cocoa app I have a WebView and I load that *.xap. Click events work fine, but I am not able to view the videos. If someone else has faced the same issue, please let me know what mistake I have done.
P.S. I had the same issue with Windows. I solved it by running the Web Project as the Startup project.