仅限iOS,将图片从图库共享到我的Ionic / Cordova / Phonegap应用程序

问题描述 投票:1回答:2

我正在尝试从库中分享图像,并希望在我的离子应用程序中获取它。我已经尝试了很多,但仍然没有理解这一点。

我试过以下插件:

https://github.com/protonet/cordova-plugin-share-extension-helper

https://github.com/markmarijnissen/cordova-plugin-share

How to share content/data through other apps in an iOS app like we do in an Android app with Intent.ACTION_SEND?

http://www.technetexperts.com/mobile/share-extension-in-ios-application-overview-with-example/

https://github.com/LokeshPatel/iOS-Phonegap-app-share-extension

ios cordova ionic-framework phonegap
2个回答
0
投票

经过一些详细的分析,这是我可以得出的结论:

在Android中,您可以使用cordova-plugin-intent将您的应用程序添加到共享列表中,如in this SO Post所述。您还可以通过在here中描述的活动中添加intent过滤器来实现此目的

在iOS中,这有点棘手,因为没有直接的插件或现成的解决方案来实现这一点。但是我可以得到的与iOS共享菜单中添加应用程序相关的最佳链接是getting listed in share menu该链接包含苹果文档以执行此操作以及Info.plist中的一些调整以实现此目的。


-1
投票

你可以使用这个插件https://github.com/wymsee/cordova-imagePicker这里已经描述了用法。它为您提供了图像的路径。

您可以使用该路径或读取图像文件以获得相当于它的qazxsw poi。例如

base64
© www.soinside.com 2019 - 2024. All rights reserved.