小编San*_*mar的帖子

SocialSharing PhoneGap插件URL_NOT_SUPPORTED

我正在使用此插件在我的Android Phonegap项目上共享图像. https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin

为了共享图像,我使用这些参数调用插件

window.plugins.socialsharing.share('Title', null,'/data/data/com.example.app/images/myimage.jpg', null);
Run Code Online (Sandbox Code Playgroud)

然后得到以下错误:

file:///android_asset/www/plugins/nl.x-services.plugins.socialsharing/www/SocialSharing.js:第93行:收到的'share'注入的错误回调:"URL_NOT_SUPPORTED"

我尝试共享的图像文件是使用Context.MODE_PRIVATE权限创建的.

File myImageFile= new File(context.getDir("images", Context.MODE_PRIVATE), "myimage.jpg");
Run Code Online (Sandbox Code Playgroud)

我怀疑其中一个可能是失败的原因:

  1. 该插件无法正常工作,因为我以错误的方式传递图像uri?
  2. 插件看不到图像,因为它是使用MOD_PRIVATE创建的

android cordova cordova-plugins

2
推荐指数
1
解决办法
1422
查看次数

标签 统计

android ×1

cordova ×1

cordova-plugins ×1