Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all available share channels can be selected #136

Closed
floatinghotpot opened this issue Jun 22, 2014 · 11 comments
Closed

Not all available share channels can be selected #136

floatinghotpot opened this issue Jun 22, 2014 · 11 comments

Comments

@floatinghotpot
Copy link
Contributor

The plugin is amazing and so easy to share to social media. Great job!

Still some confusing issue:
When calling window.plugins.socialsharing.share(msg, subject, img, link); The popup window only display some of the share channels and omit some important others.

See the screenshot:
Left popup is from system default photo app,
Right popup is from plugin share:
screenshot

Env: Android, SAMSUNG S4

@EddyVerbruggen
Copy link
Owner

Hi Raymond!

Thanks for the kudos ;)

I was looking into this issue and was trying to find the 2 marked apps (nice bug report btw). DO you perhaps have a direct link to the Play store for these apps, or can you tell me what the English word for the one on the right is? I hope those apps can be found in the NL store as well.

More to the point: Android determines which apps to show based on the mime type, which is set to "image/*". The receiving apps need to register themselves as an app which can handle files of that type. Maybe the two apps not showing up only listen to "image/jpeg" (or something similar). If that's the case, I'd better change the mimetype of the intent based on the image shared, but I'd like to debug with a misbehaving app for that..

Something to try: pass nulls except for the image param to see if it makes a difference.

Thanks,
Eddy

@floatinghotpot
Copy link
Contributor Author

Hi Eddy,

Thanks for your reply.

The right app is "WeChat"(Chinese name: 微信) from Tencent, a China company, but they have nearly 600M users (yes, 600M! ), so it's important to support it.

But it's quite strange that, the app has 2 share ways, one to share to chat with friends (发送给朋友), another is share to "discovery" (发送到朋友圈), just like someone's own cyberspace or facebook/twitter like. The first one is supported (you can see it), but the second is not.

It will try your suggestion to pass only image param and see any difference.

@EddyVerbruggen
Copy link
Owner

Hi,

I've just installed WeChat on my Nexus 7 (old model), tried sharing like this and saw the list of apps in the screenshot ('Send to moments' is the WeChat app 发送到朋友圈):

window.plugins.socialsharing.share('My text', 'My subject', 'https://www.google.nl/images/srpr/logo11w.png', null, function(){alert("ok")}, function(e){alert("error: " + e)});

screenshot_2014-06-28-20-43-34

When leaving the msg and subject params null the list is the same. Can you try with this same snippet?

@floatinghotpot
Copy link
Contributor Author

Hi Eddy,

Yes, the snippet works.
And, very strange, the original code also works now, and I changed nothing! I can even see the "Send to moments" in a version packed two days ago! (see the screenshot below)
I am totally confused ... Anyway, working is great.
socialsharing

One more question, I'd like to share to some often used apps quickly, and if I write:

window.plugins.socialsharing.shareVia('com.tencent.mm', msg, subject, img, link, 
    function(){}, onShareFailed);

It just share to "Send to Chat", how can I share to "Send to Moments" (which is more welcome) directly?

shareto

@floatinghotpot
Copy link
Contributor Author

Eddy, I've add the feature to specify activity name if the social app offers multiple sharing ways.

A pull request is created.

@EddyVerbruggen
Copy link
Owner

Thanks a lot buddy!

@floatinghotpot
Copy link
Contributor Author

Hi Eddy,
I’d like to suggest you to publish your amazing socialsharing to cordova plugin registry with cordova CLI tool: plugman, then it can be used by cordova CLI with just plugin id. Are you interested?
See:
http://plugins.cordova.io/
https://www.npmjs.org/package/plugman

@EddyVerbruggen
Copy link
Owner

Hey Raymond,

Yes I am and ever tried it once but for a reason I can't remember I didn't succeed.

The cli said it was submitted but it wasn't..

Have you been able to submit a plugin to the registry yourself?

Thanks,
Eddy

@floatinghotpot
Copy link
Contributor Author

Yes, I just know this registry and submitted 5 plugins. :P
http://plugins.cordova.io/#/search?search=rjfun

I modified the plugin.xml a little bit before publish succeed.

  1. change version number to "x.y.z" format like "1.0.0", since "1.0" is not allowed.
  2. add a bit url info.

See the diff:
floatinghotpot/cordova-plugin-admob@f64dff4

@EddyVerbruggen
Copy link
Owner

Thanks - the x.y.z may have been my problem as I only recently started to use that (recommended) scheme.

Will be testing it soon!

@EddyVerbruggen
Copy link
Owner

Hi,

Found the rootcause of my plugins.cordova.io trouble: all of my plugins have a dash in its ID (nl.x-services.plugins.*). There is a regexp bug in plugman preventing me from submitting my plugins because of this.

Just created this issue, hope they'll fix it soon: https://issues.apache.org/jira/browse/CB-7079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants