-
Notifications
You must be signed in to change notification settings - Fork 506
Conversation
UWP OK
# Conflicts: # Samples/Caboodle.Samples/ViewModel/HomeViewModel.cs
Caboodle/Caboodle.csproj
Outdated
<None Remove="Email\Email.netstandard.cs" /> | ||
<None Remove="Email\Email.shared.cs" /> | ||
<None Remove="Email\EmailMessage.shared.cs" /> | ||
</ItemGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed.
Caboodle/Email/Email.android.cs
Outdated
public static bool IsSendSupported | ||
{ | ||
get; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This technically has no explicit value (default to false). Also, this must be internal until we decide to expose it.
Caboodle/Email/Email.android.cs
Outdated
public static partial class Email | ||
{ | ||
/// Indicating whether Compose Dialog is available | ||
public static bool IsComposeSupported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must be internal until we decide to expose it.
Caboodle/Email/Email.android.cs
Outdated
string body = null, | ||
string bodymimetype = null, | ||
string[] attachmentspaths = null | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this must be on the previous line.
Caboodle/Email/Email.android.cs
Outdated
// Numerous apps can respond to ActionSend | ||
var i = new Intent(Intent.ActionSend, uri); | ||
i.SetData(uri); | ||
i.SetType("plain/text"); // i.SetType("message/rfc822"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This TODO looks like something is to be done? Or is it safe to go?
{ | ||
Email.ComposeAsync( | ||
new string[] { "moljac@mailinator.com", "moljac01@mailinator.com" }, | ||
new string[] { "moljac02@mailinator.com" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use Xamarin-y or example.org emails?
@@ -0,0 +1 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this file for?
x:Class="Caboodle.Samples.View.EmailPage" | ||
xmlns:viewmodels="clr-namespace:Caboodle.Samples.ViewModel" | ||
Title="Email" | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this on the same line
namespace Caboodle.Samples.View | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
public partial class EmailPage : ContentPage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already in the app.xaml.cs
// For testing mailboxes (w/o registration) go to: | ||
// https://www.mailinator.com | ||
tomails = string.Join(",", new string[] { "caboodle@mailinator.com", "caboodle01@mailinator.com" }); | ||
ccmails = string.Join(";", new string[] { "caboodle@mailinator.com", "caboodle02@mailinator.com" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should use third party tools - maybe there is a testing tool that just accepts everything - maybe an example.org type of thing?
I think this API needs to be looked at. I am not sure if we should really have attachments in V1 at all, seems complicated. 80% use case is.... Thoughts on this.. or maybe just have overloads? James |
I might be odd but most of my uses cases require attachments. I don't usually want to just send text in an email, I want to attach a file to export. |
@Redth I am just going to get the emails working again, and then I'll add attachments back. |
The attachments logic may be harder than just a simple URI. Android will probably need an implementation of We could get inspiration from here: |
Caboodle/Email/Email.uwp.cs
Outdated
|
||
static void Sync(List<string> recipients, IList<EmailRecipient> nativeRecipients) | ||
{ | ||
if (recipients != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just return if null? cleaner and anti-arrow :)
@@ -2,8 +2,7 @@ | |||
{ | |||
public static partial class PhoneDialer | |||
{ | |||
internal static bool IsSupported => | |||
throw new NotImplementedInReferenceAssemblyException(); | |||
internal static bool IsSupported => false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be doing this in all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just going out on a limb here and have the IsSupported bits NOT throw ever so that we can write nicer tests. But I don't really know if we will ever do this or how we should handle this idea.
What's left on this? Docs? |
Yes, let me add that if we are happy with the API. |
Description of Change
Describe your changes here.
Bugs Fixed
Provide links to issues here. Ensure that a GitHub issue was created for your feature or bug fix before sending PR.
API Changes
Behavioral Changes
Adding the email API.
PR Checklist