Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

SMS API's #26

Closed
mattleibow opened this issue Feb 25, 2018 · 10 comments
Closed

SMS API's #26

mattleibow opened this issue Feb 25, 2018 · 10 comments

Comments

@mattleibow
Copy link
Contributor

mattleibow commented Feb 25, 2018

A simple API to send an SMS.

static class Sms {
    // whether or not the device can open a compose dialog
    static bool IsComposeSupported { get; }

    // whether or not the device can send in the background
    static bool IsSendSupported { get; }

    // open the compose window, throw if not supported
    static Task ComposeAsync(SmsMessage message);

    // send a message in the background, throw if not supported
    // this is supported only on Android and UWP
    static Task SendAsync(SmsMessage message);
}

class SmsMessage {
    SmsMessage(string body, string recipient);

    string Body { get; set; }
    string Recipient { get; set; }
}

For the discussion around exceptions, see #19

@mattleibow mattleibow added this to the Preview-1 milestone Feb 25, 2018
@Redth Redth added this to New in Triage Mar 7, 2018
@Redth Redth added this to Ready in v0.5.0-preview Mar 7, 2018
@ravinderjangra ravinderjangra mentioned this issue Mar 8, 2018
5 tasks
@f1nzer
Copy link
Contributor

f1nzer commented Mar 8, 2018

What about Multi-SIM card support? It is pretty common situation on Android platform.
Should it be supported as a separate prop on droid side?

@jamesmontemagno jamesmontemagno added the up-for-grabs Implementation from community can be started. label Mar 8, 2018
@Geertvdc
Copy link

Geertvdc commented Mar 9, 2018

Hi @jamesmontemagno i'll try to see if i can implement this since it is up for grabs

@jamesmontemagno
Copy link
Collaborator

I believe there is a pr

1 similar comment
@jamesmontemagno
Copy link
Collaborator

I believe there is a pr

@Geertvdc
Copy link

oh yeah now i see. might wanna move the "up for grabs" then cause i thought i could pick this one up

@Redth Redth added in-progress and removed up-for-grabs Implementation from community can be started. labels Mar 10, 2018
@Redth Redth removed this from New in Triage Mar 10, 2018
@Redth Redth moved this from Ready for Implementation to In Progress in v0.5.0-preview Mar 10, 2018
@mattleibow
Copy link
Contributor Author

After some more discussion (which is always good) we have decided to try another approach - copying the style of emails: #27

@jamesmontemagno
Copy link
Collaborator

Looks perfect. Should it be "body" or "message", should be consistent.

@mattleibow
Copy link
Contributor Author

I used "body" as the type is the message. This is what email does.
I was thinking var message = new SmsMessage() and then message.Message is a bit weird.

@jamesmontemagno
Copy link
Collaborator

ahhhh, yeah makes sense. I think the method's properties should match :)

@jamesmontemagno
Copy link
Collaborator

oh wait
nm. ignore me

@mattleibow mattleibow mentioned this issue Mar 15, 2018
5 tasks
jamesmontemagno pushed a commit that referenced this issue Mar 21, 2018
* Adding SMS API

* Added tests

* Added docs

* Made some changes to the way SMS works

* Fix the tests
@Redth Redth moved this from In Progress to Done in v0.5.0-preview Mar 27, 2018
@mattleibow mattleibow moved this from Done to Closed in v0.5.0-preview Apr 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
v0.5.0-preview
  
Closed
Development

No branches or pull requests

5 participants