typescript - 离子分享功能无法在安卓设备中使用
问题描述
我的离子共享功能在 ios 和 prod android 真实设备中工作。但是上传到playstore的分享按钮根本不起作用。有谁知道如何解决这个问题?
const {Share} = Plugins;
import {Plugins} from '@capacitor/core';
constructor(
private socialSharing: SocialSharing
) {}
async share() {
const propertyName = this.pass.unit.property.name;
await Share.share({
title: propertyName + ' Guest Pass ',
text: 'my text,
url: this.pass.share_url,
dialogTitle: 'Share to your guests',
})
.then(res => {
res.this.ui.presentAlert('Share successful!');
})
.catch(err => {
console.log(err);
});
}
这是离子包版本
"@angular/common": "~11.2.0",
"@angular/core": "~11.2.0",
"@angular/forms": "~11.2.0",
"@angular/platform-browser": "~11.2.0",
"@angular/platform-browser-dynamic": "~11.2.0",
"@angular/router": "~11.2.0",
"@capacitor/android": "^2.4.7",
"@capacitor/core": "^2.4.7",
"@capacitor/ios": "^2.4.7",
"@ionic-native/file-opener": "^5.32.1",
"@ionic/angular": "^5.6.3",
"@ionic/pwa-elements": "^3.0.2",
"capacitor-app-tracking-transparency": "^1.1.5",
"cordova-plugin-file-opener2": "^3.0.5",
解决方案
推荐阅读
- flutter - 如何自定义 LinearProgressIndicator
- java - 为什么在这段代码中会出现握手失败异常:
- ruby - 在 Linux 上安装 Ruby 时的问题
- python - Python:如何使用 dict.get() 函数?
- swift - 通过引用快速类问题
- c++ - 减去两个字符串在 C++ 中给出了错误的值
- cmake - 使用 Visual Studio 和/或 CMake 在 Windows 10 上构建 ZeroMQ 失败
- graphql - 如何在 GraphQL 中对变量执行操作?
- android - 我无法在 Android Studio 中使用 GitHub 登录。问题是什么?
- sql - 使用窗口函数计算行数