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

HTML email body doesn't show properly in Android #2572

Closed
1 of 7 tasks
g0rdan opened this issue Jan 31, 2018 · 5 comments
Closed
1 of 7 tasks

HTML email body doesn't show properly in Android #2572

g0rdan opened this issue Jan 31, 2018 · 5 comments
Labels
p/android Android platform p/plugins Plugins platform s/needs-investigation Needs investigation by the MvvmCross team t/bug Bug type
Milestone

Comments

@g0rdan
Copy link
Contributor

g0rdan commented Jan 31, 2018

I'm using email plugin and I've noticed that when I have to use html in email body (flag "isHtml" = true) Android does not render body as I'd expect. It seems Android doesn't show <h> and <font> tags at least. To reproduce the bug, launch iOS and Android version from repo (https://github.com/g0rdan/MvvmCrossEmailPluginBug) and compare the results.

Steps to reproduce 📜

  1. Download and launch the test project for iOS

  2. Loot at result:
    image

  3. Launch the test project for Android

  4. Look at result:
    screenshot_2018-01-31-17-29-25

Expected behavior 🤔

The rendering of html bodies should be the same.

Actual behavior 🐛

They're not the same.

Is this a bug or Android has some specifications for constructing html into email bodies?

Configuration 🔧

Version: 5.6.3

Platform:

  • 📱 iOS
  • 🤖 Android
  • 🏁 WPF
  • 🌎 UWP
  • 🍎 MacOS
  • 📺 tvOS
  • 🐒 Xamarin.Forms
@g0rdan
Copy link
Contributor Author

g0rdan commented Jan 31, 2018

I've used Gmail as email client.

@martijn00 martijn00 added p/android Android platform up-for-grabs Issues up for grabs by anyone labels Mar 21, 2018
@nickrandolph nickrandolph added s/needs-investigation Needs investigation by the MvvmCross team p/plugins Plugins platform and removed up-for-grabs Issues up for grabs by anyone labels Mar 26, 2018
@nickrandolph
Copy link
Contributor

@g0rdan if you use a different email client, do you see the same issue? Might be worth looking at the html that is generated and seeing whether it's well formed

@nickrandolph
Copy link
Contributor

@g0rdan are you able to use create an email in Android directly and see if you can get it to look the same as the iOS version? We suspect this is an issue with how the email is being rendered, rather than how it's being created

@nickrandolph nickrandolph added the t/bug Bug type label Aug 9, 2018
@nickrandolph nickrandolph added this to the 6.3.0 milestone Aug 9, 2018
@g0rdan
Copy link
Contributor Author

g0rdan commented Aug 10, 2018

@nickrandolph Sorry for not answering so long. I'll look at the issue on weekend and will let you know about results.

@g0rdan
Copy link
Contributor Author

g0rdan commented Aug 12, 2018

I tried many ways to call email intent directly and watched the same result. Generally, I used something like this:

var emailIntent = new Intent(Intent.ActionSend);
emailIntent.SetType("text/html");
var htmlBody = Html.FromHtml(body, FromHtmlOptions.ModeLegacy);
emailIntent.PutExtra(Intent.ExtraText, htmlBody);
StartActivity(emailIntent);

I guess we could close the issue.

@g0rdan g0rdan closed this as completed Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p/android Android platform p/plugins Plugins platform s/needs-investigation Needs investigation by the MvvmCross team t/bug Bug type
Development

No branches or pull requests

3 participants