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

socialSharing shareViaEmail returned promise doesn't trigger. #518

Closed
ghost opened this issue Sep 1, 2016 · 5 comments
Closed

socialSharing shareViaEmail returned promise doesn't trigger. #518

ghost opened this issue Sep 1, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Sep 1, 2016

Hello,
I'm using ionic native version 1.3.17 and I'm experiencing some problems in the returned promise of the shareViaEmail method of the socialSharing plugin.

The problem is that neither then nor catch functions are getting called, so I can't know if and when the user has sent an email.

canShareViaEmail and shareWithOptions methods work as expected, but I can't use shareWithOptions because I need to pass the "to" field when sending an email.

This is my code snippet:

SocialSharing.canShareViaEmail().then((resp)=> {
            if (resp === 'OK') {
                SocialSharing.shareViaEmail(this.body, this.subject, this.to).then((resp)=> {
                    console.log(resp);
                }).catch((err)=> {
                    console.log(err);
                });
            }
        }).catch(err=> {
            console.log(err);
        });

I don't see any message in the console but I see the dialog for creating the email.

Is there something I'm missing? Thanks for the help

@ghost ghost changed the title socialSharing shareViaEmail returned romise doesn't trigger. socialSharing shareViaEmail returned promise doesn't trigger. Sep 1, 2016
@ghost
Copy link
Author

ghost commented Sep 1, 2016

I tested in android 4.4.4 with both the gmail app and the stock email app.

@ramonornela
Copy link
Contributor

I think is fix #520

@ihadeed
Copy link
Collaborator

ihadeed commented Sep 7, 2016

Fixed in c76de34 and will be available in the next release 1.3.21

@ihadeed ihadeed closed this as completed Sep 7, 2016
@ghost
Copy link
Author

ghost commented Sep 7, 2016

The problem persists, even with the fix in 1.3.21.
I've also tried with a clean ionic project, just to be sure.

@ghost
Copy link
Author

ghost commented Sep 12, 2016

Resolved by passing empty arrays in optional params.

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