How to use an PDF viewer in Flex mobile - android

I am developing a mobile application in Flex in Adobe Flash buillder 4.6 that will run on Android and iOS.
I need a way to view PDF files stored in the application storage directory. Searched in several forums and none of the suggestions worked for me.
In iOS'm using a StageWebView but Android still have not found a working solution.
Can be used ANE or not.
It needs to work offline, so I can not use google docs as a proxy.
Any suggestions?

I solved as was mentioned earlier.
Continued using webview in iOS and a ANE made a call to the Android application registered to open PDF.
Sorry for delay in giving feedback.
Thans for all

Related

How to develop the next best alternative to chrome extension in android

I have built a chrome extension that works fine. I know I can't deploy it to android. So I would have to build an app. The app may or may not have anything to do with chrome; I don't know. This isn't a chrome extension question.
But as to the integration between the app and the on-board browser, I see the android api doesn't have any functionality for browser or web integration? Is that correct?
I'm just making sure because building an app that is essentially it's own proprietary browser, just to get my functionality onto android, is not really something I think a lot of people would download. I'm looking for a more integrated way than that. Is there one?
For those who say impossible, I know for a fact there is an app which added a context menu inside chrome on android but I have no idea how they did that or what other integration is possible. It was a webpage pdf converter. Upon clicking that menu it converted the webpage to pdf, and opened the pdf in the app.

how to debug to find out the reason why the website doesn't get displayed on android browser

I am doing some tests and realised that android browser does not display my website. The other browsers are ok.
I used these libraries:
easeljs
mathjax
jquery
I also used html5 webworkers. This is my test website: thewebdesign.org/v16/
My question is:How to find out the reasons.
Take a look at https://developers.google.com/web/tools/chrome-devtools/debug/remote-debugging/remote-debugging to be able to inspect the chrome console.
Hope it helps.
Remote debugging is the most accurate / best, as suggested above, but if you are not able to use remote debugging: You can try out browserstack (http://browserstack.com/). Even though you would fix the android issue, there are no guarantees, IOS works. That is why I have been using browserstack, to test IOS.

Viewing a PDF file from HTML5 Hybrid Mobile App

Intending to view a PDF File from the Hybrid Mobile App , created using HTML5 Jquery and Packaged with Phonegap.
But unable to achieve it ,
Things i tried
<object src="xyz.pdf" type="application/pdf"></object>
also,
window.open('xyz.pdf'); //through javascript
and
$(document).load('xyz.pdf');
Can anyone suggest the best way for viewing the PDF in a Hybrid Android Mobile App.
with cordova you must think about these:
HTML 5 object tag: not working
If you try with:
window.open('http://www.???.com/my.pdf', '_blank', 'location=yes');
The InAppViewer canĀ“t open this kind of files.
I think that there aren't an hybrid solution for this problem.
You must start to search or write about a plugin that use a native pdf's opening and then use it.
An example:
cordova-plugin-file-opener
The latest solution, a little more simple but include to open google docs is:
window.open('https://docs.google.com/viewer? url=http://www.example.com/test.pdf&embedded=true', '_blank', 'location=yes');
ref = window.open('index.html', '_self');
Go look at the Mozilla pdfJS project.
This project allows you to open a pdf (embedded in app or remote) in your app. No break-out links that relies on native viewers.
They also give you a very full featured sample viewer, that you can use as is, but much of functionality in that does not apply to mobile applications.
I have had success with this on Android 4.3 Devices.
Try installing the InAppBrowser plugin to do so. I have use it to open PDF files right inside the app on both iOS and Android.
Check the official InAppBrowser doc with full doc and examples, it has several options you can enable/disable (be sure to point to your current cordova version documentation):
My solution for connected apps with offline availability...
window.open('http://www.someserver.com/doc.pdf', '_system')
...this will open in default pdf viewer. I have my clients use adobe reader for obvious reasons. And also because once it is downloaded the first time, adobe app manages and edits the documents well, and the documents are also available offline from within adobe reader thereafter. Even pdf forms.
Have cordova.js linked on the page.
Have inAppBrowser added.
For full offline you may try FileOpener plugin. I have not needed to do that on android, but I have used that way in iOS.
Hope any of this may help.
Though am late here, still want to share what I know. You can use this plugin to view PDFs in the app (without inappbrowser). Supports only Android and iOS.

Compiling HTML5 app using Phonegap issue

I've compiled my HTML5 app using phonegap and using Boostrap 3 to help speed development.
I've installed the app on my mobile but some of my images aren't showing.
I'm using svg's but I don't think that is the problem because one of them is loading and the other two aren't. The images test fine and show fine in my web browsers but just not as an app.
Any ideas help, does this have something to do with the config.xml file and outlining the app to have access to resources from a web server?
I'm also looking for advice to how intergrating facebook login works?
please verify in your config.xml
<access origin="*"/>
i think issue may come ios only.
then using cordova only not possible to achieve facebook login. so you need to integrate with facebook connect plugin.
http://css-tricks.com/using-svg/
Have a look at the above link. svg has problems with android 2.3 and down.

How to download and save a file locally, open it offline using Phonegap?

I am developing a cross-platform application. I came across Phonegap, which supports several mobile devices. But I am new in this field so I'm facing some issues.
I have a requirement, where the user downloads video files from a server and then opens those from local storage from mobile.
So how to achieve this using Phonegap, which should support iOS, Android and Windows.
I have already gone through:
Phonegap - jQuery Mobile - Download/Save/Load File
http://docs.phonegap.com/en/2.0.0/cordova_file_file.md.html#LocalFileSystem
But I'm not getting proper documentation/tutorial. If there are any examples available then it would be helpful to check/debug.
Thanks in advance.
A search on SO shows that on Android there are some issues with HTML5 video and Phonegap:
Phonegap 2.3 and Android with HTML5 video tag in 2013
At least in Window Phone 7 there are some tricks as well (storage path related).
How to play embedded video in WP7 - Phonegap?
Which may explain why there isn't a single multi-platform example which is what I think you are looking for.

Categories

Resources