【问题标题】:Reading Pdf, Doc, Ppt and xls files in android and ios using phonegap使用 phonegap 在 android 和 ios 中读取 Pdf、Doc、Ppt 和 xls 文件
【发布时间】:2015-03-09 12:57:49
【问题描述】:

我正在寻找在我使用 Sencha Touch 2.4 和 Phonegap(Android 和 Ios)开发的混合应用程序中打开和阅读 Pdf、Doc、Ppt 和 xls 文件的方法。

到目前为止我做了什么

  1. 通过搜索得知Ios WebView支持Pdf、Doc、Ppt,但在Android WebView上不支持。所以我不能同时在 Android 和 Ios 上使用 WebView。

  2. 设备需要离线工作所以,我不能使用谷歌文档查看器。

  3. 试过cordova-plugin-file-opener2 File Opener,但总是得到“错误状态:9 - 错误消息:找不到文件”

我怎样才能做到这一点?

【问题讨论】:

    标签: android ios cordova sencha-touch-2 cordova-3


    【解决方案1】:

    尝试使用 inAppBrowser 插件

    https://github.com/apache/cordova-plugin-inappbrowser

    iOS 使用

    cordova.InAppBrowser.open('yourFileUrl', '_blank');
    

    安卓使用:

    cordova.InAppBrowser.open('yourFileUrl', '_system');
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-18
      • 2012-06-16
      • 1970-01-01
      • 2011-01-31
      • 1970-01-01
      • 2013-04-30
      相关资源
      最近更新 更多