.NET Components for Mobility

detecting outgoing SMS and MMS messages

Last post 07-31-2008 3:13 AM by PeterFoot. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 03-25-2008 1:41 PM

    detecting outgoing SMS and MMS messages

    Hi,

     is there a way for detecting outgoing SMS and MMS messages (I just want to detect them) with this library?

     

    regards,

    Santiago

  • 03-25-2008 2:52 PM In reply to

    Re: detecting outgoing SMS and MMS messages

    There is no standard way to detect this. If your account is configured to save sent items you could check the SentItems folder for new messages. This will be easier in the next release which will have events for new/moved messages rather than enumerating the folder.

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 06-12-2008 3:22 AM In reply to

    Re: detecting outgoing SMS and MMS messages

     

    PeterFoot:

    There is no standard way to detect this. If your account is configured to save sent items you could check the SentItems folder for new messages. This will be easier in the next release which will have events for new/moved messages rather than enumerating the folder.

    Peter

    is this possible with v3.20 ? How?

    http://oldsap.blogspot.com
  • 06-12-2008 12:27 PM In reply to

    Re: detecting outgoing SMS and MMS messages

    3.2 exposes some new events - OutlookSession.MessagingItemCreated etc You can hook this event to check if the newly created message is an SMS and if so read it's properties.

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 06-12-2008 7:11 PM In reply to

    Re: detecting outgoing SMS and MMS messages

    Thank you Peter :) 

    can you please post a sample code in vb net? 

    http://oldsap.blogspot.com
  • 06-14-2008 1:01 AM In reply to

    Re: detecting outgoing SMS and MMS messages

    i already have this which triggers perfectly:

    Private WithEvents session As New InTheHand.WindowsMobile.PocketOutlook.OutlookSession

     Private Sub sent(ByVal sender As Object, ByVal e As InTheHand.WindowsMobile.PocketOutlook.MessagingItemEventArgs) Handles session.MessagingItemMoved
            'do something...
        End Sub

     

    But how do i get the specific sms item that has been moved? 

    http://oldsap.blogspot.com
  • 06-15-2008 1:01 PM In reply to

    Re: detecting outgoing SMS and MMS messages

    You can get the messaging item from the ItemId in the EventArgs e.g.

    Message m = OutlookSession.GetItemByItemId(e.ItemId);

    if(m is SmsMessage)

    {

    //cast to SmsMessage...

    }

    else if(m is MmsMessage)

    {

    //cast to MmsMessage

    }

     

    Sorry this is C# but should convert easily to VB.NET.

     

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 06-15-2008 9:53 PM In reply to

    Re: detecting outgoing SMS and MMS messages

     is it possible also to get an eventarg when a sms is opened?

    http://oldsap.blogspot.com
  • 06-16-2008 12:46 PM In reply to

    Re: detecting outgoing SMS and MMS messages

    Not specifically although often the action of opening an email through the application causes that message to be updated which will raise the MessagingItemChanged event

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 07-09-2008 11:41 PM In reply to

    Re: detecting outgoing SMS and MMS messages

    Private Sub moved(ByVal sender As Object, ByVal e As InTheHand.WindowsMobile.PocketOutlook.MessagingItemEventArgs) Handles session.MessagingItemMoved
            If e.ParentItemId.ToString = "0000000026000031010000000000000000000000" Then
                playSound("\Storage Card\Program Files\Oist\unknown.wav")
                If CheckBox2.Checked = True Then
                    Dim msg As InTheHand.WindowsMobile.PocketOutlook.SmsMessage = session.GetItemByItemId(e.ItemId)
                    'Do Something

                End If
            End If
        End Sub

     

    in the above code, when i use the default tmail.exe everything works fine.  But if i use Vito SMS-Chat, it wil only trigger the playsound but not the Dim msg...

    How come? 

    http://oldsap.blogspot.com
  • 07-31-2008 3:13 AM In reply to

    Re: detecting outgoing SMS and MMS messages

    I can't see why this would be. Have you checked in the debugger that e.ItemId is valid at this point and is definitely an SMS message?

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
Page 1 of 1 (11 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.