Hi,
I am planning to implement a ebook pdf reader by getting the url of the pdf (which resides locally or on web) on an Android device and read it.
I have read in livedocs that only when the condition (HTMLLoader.pdfCapability == HTMLPDFCapability.STATUS_OK) is true, the pdf will be read. But its never true on my machine or on the device.
Please help. What else do I need to do?
Thanks
Monika
Hi Monika,
I think you need to use StageWebView as HTMLLoader is not supported on mobile profile:
http://help.adobe.com/en_US/air/build/WS144092a96ffef7cc16ddeea2126bb4 6b82f-8000.html
You could use HTMLLoader.isSupported to detect this feature if you have cross-platform code and when using StageWebView:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fla sh/media/StageWebView.html
you also can check for feature support with StageWebView.isSupported in your code - both as sanity checks.
Also take note on this:
In Android 3.0+, an application must enable hardware acceleration in the Android manifestAdditions element of the AIR application descriptor to display plug-in content in a StageWebView object.
in linked doc. Also:
http://forums.adobe.com/message/3738416
regards,
Peter
Thanks Peter.
Somehow I figured out the use of StageWebView and I am able to view the pdf on the emulator. The pdf resides in the project folder itself.
But when I package the app and run it on the android device, the pdf doesnt show up.
Does it mean that when I package the app, the pd doesnt get packaged?
Regards
Monika
Hi Monika,
What I'm not sure about is if Adobe Reader (9 or X) for Android supports plugin mode on Android for web views (I've no Android device now so can't tell you for sure - I know that Android OS has no built-in support for PDF content contrary to iOS via web browser). Emulators are useful for general test but not for feature critical testing. I'd rather ask now if Reader X (available for install via app market) supports plug-in mode either here:
http://forums.adobe.com/community/adobe_reader_forums/android
or here:
http://forums.adobe.com/community/air/development/mobile
regards,
Peter
In Android 3.0+, an application must enable hardware acceleration in the Android manifestAdditions element of the AIR application descriptor to display plug-in content in a StageWebView object.
I'm having major trouble with displaying PDFs in Android inside a StageWebView. The code doesn't give me any errors, but then inside my app on Adnroid the StageWebView shows up Blank
From what I've read inorder for STageWebView to disply "plugin" you need Hardware acceleration turned on, but the part I cannot figure out is how do I publish for Android 3.0 in Flash Builder or Flash? It seems you can select "ANDROID" but in that theres no version selection.
Harware selection only exists in Android 3.0 and above, so it seems this is a GIGANTIC BLUNDER on Adobe's part?....... How can we build for Hardware acceleration when there is no option to publish to the OS that supports it?
Is there a way to tell Adobe Flash BUilder 4.6 or Flash Professional to Publish for Android 3.0 SDK?
COME ON ADOBE!!!
OK SO I GUESS SINCE THIS IS UN ANSWERED.... WE"LL JUST HAVE TO FIGURE THIS OUT OURSELVES.....
I'm just going to start posting a running thread on what I'm finding:
-- ok so StageWebView works when I run it locally in the emulator, it loads the PDF just as it would in IE or FireFox, I
I've also read on a post that StageWebView work by sort of displaying the "Default web browser onthe device" sort of like a window chopped through the AIR app? If this is the case it sort of makes since that it's not working on Android because you can't really preview a PDF inside a web browser, is automatically downloads it and tries to run it with a native app.... if this is the case then the blank window in StageWebView is dead because it's done what it was was suppose to it's now up to the device.
--- I read that "Dolphin browser on android run PDFs inside itself", if this is the case then how do you switch the "Default" broswer in Android? If AIR just chops a hole in your app to use the native browser, well then Dolphin could work?
-- I've tried just about ever configuration of app manifest and Hardware acceleration, I'm pretty sure at this point, this is not the reason it doesn't work. in that the "plug-in" they are talking about is the video plugin inside the HTML5 markup....
Did you every find an answer to this as I am having the same problem?? I cannot diplay a PDF in android version 2.4. It works GREAT on the desktop and I-devices. Just not Android. I think this is some sort of bug in the StageWebView for an Adobe product not to know how to render another Adobe product. (air on android cannot display a PDF in their stageWebView class)
North America
Europe, Middle East and Africa
Asia Pacific