Home / Topic / open pdf on android

open pdf on android

Viewing 3 posts - 1 through 3 (of 3 total)
  • susa38

    I have an app on appstore.
    Now I have made it for android

    1- on kwik 3.5.6

    Normally I show some pdf files on ipad with web replacement (local file) made on kwik.
    When I try it on android tablet it does not show nothing.
    Is not possible to show pdf on android tablet with the same way that when I use for ios tablet?

    Is there other way to show pdf files on android tablet?


    In Corona SDK forum, I found this


    Can you test the following syntax?




    Thanks Yamamoto.
    I go to try the solution you comment.

    I have been looking for this theme in corona forums and I think that it’s possible to show pdf inside the app on ios ipad but on android system is not too easy.
    Is possible in Corona Enterprise, but not Corona SDK
    Also it’s possible to use external library but I’ve not test with them (some of theme are very expensive)

    But with the web view (web replacement system) in kwiksher and corona sdk is not possible in android systems.
    The normal way the programmers make is to download the pdf and then open it with external app installed on the tablet.
    It the user do not have an app to view pdf files he can’t view the pdf file.

    In this post i have been answer on corona forums

    they comment to me this…
    (I have not tested yet)

    On Android, you can use the system.openURL() function. That’ll display your local PDF file via the default PDF view installed on the device. This is more of the Android way of doing it because when the end-user is done looking at the PDF file, pressing the Back key will take them back to your app.

    local wasOpened = system.openURL(system.pathForFile("my_file.pdf"))
    if (wasOpened) then
       -- PDF was opened successfully by the default PDF viewer.
       -- Note that your app will be suspended when this happens.
       -- A PDF viewer is not available on the device.
       -- You can ask the user nicely to install one in order to view PDF files.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Privacy Preference Center

Strictly Necessary

these coolies are for WP-SpamShield, gdpr-wp, woocommerce, paypal

PHPSESSID, SJECT16, JCS_INENREF, JCS_INENTIM, gdpr, woocommerce_cart_hash, woocommerce_items_in_cart, woocommerce_recently_viewed, wordpress_, wordpress_logged_in_, wordpress_sec_, wordpress_test_cookie, wp_woocommerce_session_, AKDC, akavpau_ppsd


WordPress cookie created when auto-saving a post in the editor.

wp-saving-post, wp-settings-, wp-settings-time-


google analytic