【问题标题】:ionic v3 social sharing plugin not woking android API 30ionic v3 社交分享插件不工作 android API 30
【发布时间】:2021-11-29 19:59:41
【问题描述】:

为 Android API 30 构建后,在 Android 11 中,共享不再工作

share() {
    this.socialSharing.canShareVia('WhatsApp', "message", "subtitle", "https:example.com/image.png", "https:example.com/image.png")
    .then(() => { console.log("Can share via WhatsApp"); })
    .catch((error) => { console.log("Can't share via WhatsApp", error); });
  }
  error: com.android.bluetooh, com.android.google.gms, com.android.bips, etc

【问题讨论】:

  • 您好 Gladisson,您能否添加有关该错误的更多信息?请在此处粘贴整个错误

标签: android ionic-framework


【解决方案1】:

解决方案在android平台的config.xml下面添加这个

<platform name="android">
     <config-file parent="/manifest" target="app/src/main/AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android">
      <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
     </config-file>
    </platform>

【讨论】:

    猜你喜欢
    • 2019-06-13
    • 1970-01-01
    • 2017-01-09
    • 2016-07-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多