Send SMS from PC via Activesync and Smartphone

Last post 03-28-2008 5:03 by Neil. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 07-15-2005 17:17

    Send SMS from PC via Activesync and Smartphone

    Hi!
    I need to create a .net windows-app, which can be used to send an sms via a smartphone - when the phone is connected via activesync. Plain and simple - I hope. ;)

    I have tried googling on this topic, but with no luck. Found samples on how to send sms from smartphone-apps, but no luck with this. I also did a lot of reading on this site, and in the forum - and I am still pretty close to where i started....

    I also tried the RAPIVB sample, which connects via activesync, and gets me some of the way... But getting from there to sending an SMS... [?]

    I use either VS2003 or VS2005 beta.

    Thanks in advance

    - Klaus
  • 07-16-2005 0:31 In reply to

    Re: Send SMS from PC via Activesync and Smartphone

    Klaus,

    did you look into OpenNETCF.Phone.Sms Namespace? The Sms class owns a method called SendMessage and this method sends out SMS via PPC PE or SP. Following code is C# and works at least for me:

    int smsHandle;

    Sms mySMS=new Sms(SmsMode.Send);
    SmsAddress myAddr=new SmsAddress();
    SmsMessageStatus myStat=new SmsMessageStatus();

    myAddr.Address="+491707923910"; // put your destination address here - with international prefix
    myAddr.Type=AddressType.International; // this tells SendMessage that we have an international destination
    smsHandle=mySMS.SendMessage(myAddr,"the quick brown fox jumps over the lazy dog");

    Does this code do what you expect? I've used this code for SDF 1.2 installed on VS2003, so you don't need to go for a beta.

    Regards ukiller
  • 07-16-2005 1:25 In reply to

    Re: Send SMS from PC via Activesync and Smartphone

    Hi Ukiller, thanks for your reply.

    The code you post will send an sms from a smartphone-application. That is not what I want.

    I want to send an SMS from a windows-application (on my pc) VIA my smartphone, which is connected via Activesync.

    Maybe the solution is to create an application on the smartphone (or a library anyway) which can send an sms, and then create and application on the desktop-pc, which will communicate with the smartphone-app via activesync.

    One option is to make a windows-app, which saves sms'es as xml on the local pc, then transfers the xml-file to the smartphone via activesync - where it is thrown in a special directory. On the smartphone an application is monitoring changes to that dir - opens the xml-file, reads the destination phonenumber and text - and sends it.

    I just thought - there must be a better way. :)
  • 07-16-2005 4:32 In reply to

    Re: Send SMS from PC via Activesync and Smartphone

    So why do you go through the AS hassle and don't use your SP as a modem device from your PC? Then you could use AT commands to achieve what you want to do. One possible soultion is to use the SP built in bluetooth profile for modem (if you SP can bluetooth at all) and use this for SMS transmission. There surely are several ways to achieve what you desire without going through AS at all.

    Regards ukiller
  • 07-16-2005 5:18 In reply to

    Re: Send SMS from PC via Activesync and Smartphone

    Just one thought for RAPI: create a console application for your SP that takes two arguments (destination phone no and SMS text) and execute this app under PC control.

    Regards ukiller
  • 07-16-2005 8:10 In reply to

    Re: Send SMS from PC via Activesync and Smartphone

    quote:
    Originally posted by ukiller

    So why do you go through the AS hassle and don't use your SP as a modem device from your PC?



    Because I did not know it was an option! [:D]

    Ill look into it, thanks for your valuable input! [:)]
  • 03-27-2008 14:20 In reply to

    Re: Send SMS from PC via Activesync and Smartphone

    Hi ukiller,

    This was very helpful. However, I am trying to retrieve all SMS stored in my pocketpc into my application. How can i do this?

    I have researched EVERYWHERE and i cant seem to find this. Please advice.

    Thanks

     

    Filed under:
  • 03-28-2008 5:03 In reply to

    • Neil
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-30-2007
    • North Wales
    • Posts 1,149

    Re: Send SMS from PC via Activesync and Smartphone

    You need to go low-level and use MAPI on the device to read the contents on the SMS store.  Once that hurdle is cleared, you need figure out a way of getting the data retrieved via MAPI back to the desktop. RAPI (via a custom RAPI Extension method) could be an option.


Page 1 of 1 (8 items)