当用户单击图像的共享按钮时,我试图让"离子"应用程序出现在"共享"列表中.
据我所知,我必须添加类似的东西
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
到了AndroidManifest.xml.我认为,我可以使用cordova-custom-config插件.
然后,我必须以某种方式处理这个意图,这对我来说是棘手的.看起来像目前为意图维护的唯一的cordova插件就是这个.我尝试过这样使用它:
initializeApp() {
this.platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
this.statusBar.styleDefault();
this.splashScreen.hide();
this.registerBroadcastReceiver();
});
}
private registerBroadcastReceiver(){
window.plugins.intentShim.registerBroadcastReceiver({
filterActions: [
'com.darryncampbell.cordova.plugin.broadcastIntent.ACTION'
]
},
function(intent) {
// Broadcast received
console.log('Received Intent: ' + JSON.stringify(intent.extras));
}
);
}
Run Code Online (Sandbox Code Playgroud)
但是这样我得到一个错误,即window.plugins是未定义的.我真的不知道如何将它与Ionic结合起来. …
当我在iMessage中打开附加图像并点击"共享"按钮时,我可以看到第三方应用程序的图标,如"Path"或"Evernote".问题是:如何将我自己的应用添加到此列表中?

我们有一个现有的 Cordova iOS 应用程序,我们需要一个 iOS 共享扩展程序,它允许用户与我们的应用程序共享来自其他应用程序(如照片、页面、数字、主题演讲等)的文件(即将文件从页面导出到我们的应用程序) )。
我们需要提供以下物品: