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

Display.getInstance().sendMessage on iOS and on Javascript #2756

Closed
jsfan3 opened this issue Apr 9, 2019 · 4 comments
Closed

Display.getInstance().sendMessage on iOS and on Javascript #2756

jsfan3 opened this issue Apr 9, 2019 · 4 comments

Comments

@jsfan3
Copy link
Contributor

jsfan3 commented Apr 9, 2019

The following code:

String email = "nospam@nospam.com";
Message message = new Message("");
Display.getInstance().sendMessage(new String[] {email}, "", message);

opens an app picker on Android 7, in my case it allows to choose Gmail or another email app. So it works fine.

But on iPhone X, it shows a Dialog with the title "No Mail Accounts" and the text "Please set up a Mail account in order to send email". That's not correct, because in that iPhone I have the apps "Gmail" and "Protonmail" used every day.

Moreover, the same code doesn't do anything on the Javascript port (tested on Android Chrome and on iOS Safari). I tested it inside an ActionListener of a Button.

@shannah
Copy link
Collaborator

shannah commented Apr 9, 2019

Javascript doesn't implement this yet. I'll add that.

On iOS, we use MFMailComposeViewController which seems to rely on the "mail accounts" in settings - closely tied to the Mail app. I found many other threads on Google mentioning this same issue. Some have suggested workarounds involving a fall back to actually opening the mail app in the system in such cases, rather than showing the mail composer inside the app. I'll look into adding such a workaround here.

shannah added a commit that referenced this issue Apr 9, 2019
…is called and mail accounts aren't set up yet in settings. #2756
@shannah
Copy link
Collaborator

shannah commented Apr 9, 2019

This is now implemented in the Javascript port. It will be included in next update.
On iOS, it will now fall back to opening the mail app to send mail if accounts aren't setup in settings. This will also be available in the next update.

@jsfan3
Copy link
Contributor Author

jsfan3 commented Apr 12, 2019

Your fix is not included in the server update of today: the test code doesn't do anything on the Javascript port (tested on Android Chrome and on iOS Safari).

@jsfan3
Copy link
Contributor Author

jsfan3 commented Apr 12, 2019

Solved: now this fix is included.

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