2

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

<!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>
4

0 回答 0