wp7 sms sending recieving and sms interceptors - windows-phone-7

Is there any way to send and recieve sms in wp7?
And is there any way smsinterceptors
if not
is there any alternative way to do it?
Any third party tool like that?

You can only send a SMS through SmsComposeTask class but like every task you can only show them - actually executing the action is done by the user.
If you want something to do which isn't accessible from the public API you can't do it. In some rare cases you'll find some homebrown apps but only a minority will use them.
If you can't live with this you should choose a different mobile os.

Related

How to make Slack app send a private message via an incoming webhook to someone specific?

I created a Slack app that sends a series of interactive messages to a channel. In my Slack API dashboard, I see that I can create and remove hooks. Right now the hook url that I have set up in my code is the one for the Slackbot channel.
But the problem is that such a message only gets sent to me.
I want to send the Slackbot messages to Alice in situation A, and to Bob in situation B. Not just to myself, the guy who configured the app.
What's the best way to do this?
I would suggest that you should not use hooks for this. A more sane way to do this right would be via chat.postMessage Web API method which is documented here!
This is because hooks are tied to specific conversations and that approach quickly hits a wall on what it can really achieve, especially messaging different people. Once you start using the web API it's pretty simple. Just ask for the scope during app installation (remember to add that scope in your dashboard), subscribe to the event in your API dashboard and then you are good to go.
Everytime you send a message via that method, Slack will send you a payload which you can use for testing and logging etc.
You can see all the different ways to message programmatically inside Slack here.

Twilio SMS Physical Phone Integration

In a perfect world, the solution I'm looking for would be an api resource tied to my physical phone, e.g. I could POST an sms message to https://url.com/api/sms, and this api would have the end result of sending an sms from my physical phone. This means that the sms conversation would appear natively in my phone; if the recipient replies to the sms, it would appear just as a normal conversation as if I had physically typed the original sms via my phone.
I understand that I could set the replyto/callback/caller-id via Twilio's api. This would mean that the sms gets sent out by the api, and if the recipient replies to it, I could have the reply forwarded to my phone. But what would be missing in this scenario is the original message sent via the api, that the recipient is replying to.
Is there a streamlined way to achieve this, perhaps with Zapier?
One arduous solution I have in mind is to write an on-phone-app to intermediate the sms transmission so that I essentially have an sms-controlled api on the physical phone vs. a traditional http api. (On android, the api would "listen" via DATA_SMS_RECEIVED_ACTION and then send via sendTextMessage). But this seems cumbersome and would also require updating the app code when/if android changes the underlying SmsManager library. The advantage of this is that I could avoid Twilio altogether, by using my service provider's email-to-sms to send to the on-phone-makeshift-sms-api.
Twilio developer evangelist here.
I think you are looking for a feature that we just announced in preview. This is known as Hosted SMS and allows you to add SMS powered by Twilio to your existing phone number.
You need to apply to get access to Hosted SMS as it is newly in testing. You can do so with the form here: https://www.twilio.com/sms/hosted
I've set up texting to a physical phone by using Twilio's SIM cards and associating it to a phone number.

Is there a way to check for missed/unread notifications?

Is there an api in mango sdk that allows me to programatically poll the notifications/toast to at least get the count. I'd like to write background service check for missed messages.
It's not possible to get hold of the email/SMS messaging details like this in Windows Phone. The only way to interact with the email client is via the SDK Launchers and Choosers: see this link on MSDN.
About all you can do is call the EmailComposeTask or SmsComposeTask for writing a plain text email or SMS, or EmailAddressChooserTask for getting an email address from the address book.
Also bear in mind that launchers and choosers must be initiated by a user action and cannot be launched from any background agent code.

EmailComposerTask - how to detect if email wasn't sent?

I'm using EmailComposerTask to send an email.
Is there any way to detect if email wasn't sent for problems like no connection, invalid email setting, mail server temporary down etc ?
I cannot find any way get this information.
Unfortunately this is not possible. Tasks in WP7 consists of launchers and choosers, the EmailComposerTask is one of the launchers which is defined as being:
A “fire and forget” action, where a specific Windows Phone functionality is launched, for example, sending an SMS message, opening a webpage, or placing a phone call
There is no way to know the result of the action you launched. Source

Simulating an attachment in the emailtask

In phone7 development, being able to send an email requires the use of the email task. This object doesn't not have an attachments property, and many ppl on various forums have complained about this particular lack of functionality. The problem is that Microsoft applications such as the picture gallery and OneNote have the ability to attach images and sound recordings to emails. This implies that there is a way to attach them.
Question: Is there a "hack" or other method that can be used to send emails with attachments in phone7?
No, there is no way to send attachments via the EmailComposeTask in a third party app. If you don't want to use an EmailComposeTask, you could create a server that runs a webservice which performs the sending of the email. Your app could then upload the attachment to that webservice.

Resources