I don't think Android supports that functionality.
Try opening any PDF on the web with the browser on an Android device, it will download the PDF instead of displaying it.
I think that @PierreSolutions is correct. Does your app exhibit that behavior (that is, does it download the PDF?) when running on the device?
Senior Content and Community Manager
Adobe Systems Incorporated
Thanks a lot!
I have tried your method, and I used "navigateToURL" to open the web with the browser. I could open a remote PDF file in http website.
Unfortunately, I could not open the native PDF file.
The codes are below.
It worked well in emulator, but failed in Android Pad. The OS alerted "file path error".
Is anything wrong in my codes?
Many thanks for your reply!
I just want to open a native PDF file rather than a remote one .
I have work on this problem for a long time.But I was unable to
solve it. How can I open a native PDF file? The browser showed that
file path was incorrect. How can I form the right file path?My
codes are below.
It worked very well in emulator, but failed in Android Pad.
I noticed that you are an employee of Adobe company.
Could you please give me some suggestion in detail? Thank you very
Sorry to say that I'm not sure of the answer, either.
One suggestion would be to try something like File.openWithDefaultApplication(), although I've never tried it on mobile.
Also, I poked around stackoverflow, and it looks like people have done this using Android Intents, but you might have to use a Native Extension to do this in AIR.
Apologies that I can't be more helpful.
I have tried the methods above, but failed.
Thank you for your help anyway.
Has anybody found a solution to this problem? Thanks, Neil
I think the solution is an Android Native Extension to which you pass the path and file name. It would in turn call Android's file handling routines which would trigger the dialog asking which application should be used ... or if one was already associated with that file type, it would launch it.
I found such an extension here http://activeden.net/item/document-launcher-native-extension-for-android/2015733 I have not tried it and can't vouch for it, but it seems to do what you are looking for.
I know it has been a very long time, but air on android still does not allow PDFs opening on the device. I have used the above ane and just wanted to provide an update for anyone else seeking info..
That ane does open PDF files as long as there is a reader available. It is also very easy to implement using two lines of code, or two lines and a basic function to tell the user that it needs a reader installed.