bluetooth_content_share.html未在Phonegap共享插件中发送错误

时间:2013-02-27 12:56:15

标签: android cordova bluetooth phonegap-plugins

我正在使用Phonegap for Android的共享插件,我创建了一个项目并集成了该插件。在通过蓝牙共享时,打开BT后,内容不会被共享,我收到的是“bluetooth_content_share.html未发送”的toast消息。可能有什么问题?以下是我使用的代码。

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
        <title>Phonegap Calender plugin</title>
    </head>
    <body>
        <div class="app">
            <h1>Apache Cordova</h1>
            <div id="deviceready" class="blink">
                <p class="event listening">Connecting to Device</p>
                <p class="event received">Device is Ready</p>
            </div>
        </div>
        <script type="text/javascript" src="cordova-2.0.0.js"></script>
        <script type="text/javascript" src="share.js"></script>
        <script type="text/javascript">
        document.addEventListener("deviceready", onDeviceReady, false);
    function onDeviceReady() {
    alert('onDeviceReady');
        window.plugins.share.show({
            subject: 'I like turtles',
            text: 'http://www.mndaily.com'},
            function() {alert('success');}, // Success function
            function() {alert('Share failed')} // Failure function
        );
    }

        </script>
    </body>
</html>

0 个答案:

没有答案