【问题标题】:Phonegap build email plugin not recognizedPhonegap 构建电子邮件插件无法识别
【发布时间】:2016-02-14 02:26:45
【问题描述】:

我构建了一个应用程序,它利用 phonegap 构建插件来编写带有附件的电子邮件。该应用程序在 iOS 设备上运行良好,但电子邮件无法在 Android 设备上运行。这是我的 config.xml 的一部分:

<preference name="disable-cursor" value="true" />
    <preference name="orientation" value="default" />
    <preference name="fullscreen" value="true" />
    <preference name="webviewbounce" value="false" />
    <preference name="permissions" value="none"/>

    <gap:platform name="android" />

    <preference name="loadUrlTimeoutValue" value="700000" />
    <gap:config-file platform="android" parent="/manifest"><application android:hardwareAccelerated="false"/></gap:config-file>   
    <icon src="icon.png" hover="true"/>
    <icon src="icon.png" default="true" width="57" height="57"/>

    <icon src="icons/android/mdpi.png" gap:platform="android" gap:qualifier="mdpi" />
    <icon src="icons/android/hdpi.png" gap:platform="android" gap:qualifier="hdpi" />
    <icon src="icons/android/xhdpi.png" gap:platform="android" gap:qualifier="xhdpi" />
    <icon src="icons/android/xxhdpi.png" gap:platform="android" gap:qualifier="xxhdpi" />

    <gap:splash src="splash.png" width="270" height="480" />
    <gap:splash src="default-568h@2x.png" gap:platform="ios" width="640" height="1136"/> 
    <splash src="splash.png" />

    <feature name="http://api.phonegap.com/1.0/file" />
    <feature name="http://api.phonegap.com/1.0/network"/>
    <feature name="http://api.phonegap.com/1.0/contacts"/>

    <plugin name="com.jcjee.plugins.emailcomposer" spec="1.4.6" source="pgb" />
    <plugin name="cordova-plugin-file" spec="3.0.0" source="pgb"/>

还有我调用电子邮件编写器的 javascript:

 window.plugins.emailComposer.showEmailComposerWithCallback(null, email_subjectdef, "", email_default, [], [], true, [compatibleAttachment, compatibleAttachment2]);

我目前正在尝试 jcjee 插件,但也尝试了 deappplant 插件。

我在设备上收到的错误是: "无法读取未定义的属性 'emailcomposer'。

感谢您的帮助!

【问题讨论】:

    标签: email build phonegap-plugins


    【解决方案1】:

    我能够确定错误是什么,因为电子邮件插件在 Android 上运行良好。我一直在使用 iframe 来显示 PDF 文件。显然,Android 4.4.2 不喜欢 iframe,至少在 Phonegap Build 项目中不喜欢。删除 iframe 解决了我的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-12-21
      • 1970-01-01
      • 1970-01-01
      • 2013-10-29
      • 1970-01-01
      • 2010-09-28
      • 1970-01-01
      相关资源
      最近更新 更多