0

以下は私が使用しているコードです

SocialSharing.js

function SocialSharing() {
}

SocialSharing.prototype.available = function (callback) {
  cordova.exec(function (avail) {
    callback(avail ? true : false);
  }, null, "SocialSharing", "available", []);
};

SocialSharing.prototype.share = function (message, subject, image, url, successCallback, errorCallback) {
  cordova.exec(successCallback, errorCallback, "SocialSharing", "share", [message, subject, image, url]);
};

SocialSharing.install = function () {
  if (!window.plugins) {
    window.plugins = {};
  }

  window.plugins.socialsharing = new SocialSharing();
  return window.plugins.socialsharing;
};

cordova.addConstructor(SocialSharing.install);

detailView.js

私のウェブページから共有プラグインを呼び出す

window.socialShare.share("test");

構成.xml

<?xml version="1.0" encoding="UTF-8"?>

<widget xmlns     = "sd"
        id        = "io.cordova.helloCordova"
        version   = "2.7.0">
    <name>HTML Displayer</name>

    <description>
       HTML Displayer
    </description>

    <author href="" email="">
        Modulaity Team
    </author>

    <access origin="*"/>


    <content src="index.html" />

    <preference name="loglevel" value="DEBUG" />
    <!--
      <preference name="splashscreen" value="resourceName" />
      <preference name="backgroundColor" value="0xFFF" />
      <preference name="loadUrlTimeoutValue" value="20000" />
      <preference name="InAppBrowserStorageEnabled" value="true" />
      <preference name="disallowOverscroll" value="true" />
    -->
    <!-- This is required for native Android hooks -->
    <feature name="App">
        <param name="android-package" value="org.apache.cordova.App" />
    </feature>
    <feature name="SocialSharing">
        <param name="android-package" value="com.bnppf.ssc.imb.sf.shell.htmldisplayer.plugins.SocialShare" />
    </feature>
    <feature name="NetworkStatus">
        <param name="android-package" value="org.apache.cordova.NetworkManager" />
    </feature>
</widget>

Android 4.4 では、ソーシャル共有は正常に機能していますが、Android 2.3 から android 4.0 へ。上記のポップアップが表示されます...

私は何を間違っていますか?

4

0 に答える 0