G
Guest
I'm using Visual Studio 2005, and the .Net 2.0 Framework to intercept an sms
message. When I deploy the solution to a Windows mobile 5 phone, the sms
message interception does not work, any message sent end up directly in the
inbox. What do I need to do to make this work?
Here's the code.
Private WithEvents msgInterceptor As MessageInterceptor
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
msgInterceptor = New
MessageInterceptor(InterceptionAction.NotifyAndDelete, True)
msgInterceptor.MessageCondition = New
MessageCondition(MessageProperty.Body,
MessagePropertyComparisonType.StartsWith, "?", True)
AddHandler msgInterceptor.MessageReceived, AddressOf
smsInterceptor_MessageReceived
End Sub
Private Sub smsInterceptor_MessageReceived(ByVal sender As Object, ByVal
e As MessageInterceptorEventArgs)
Dim message As Microsoft.WindowsMobile.PocketOutlook.SmsMessage =
CType(e.Message, Microsoft.WindowsMobile.PocketOutlook.SmsMessage)
MessageBox.Show(message.Body)
End Sub
message. When I deploy the solution to a Windows mobile 5 phone, the sms
message interception does not work, any message sent end up directly in the
inbox. What do I need to do to make this work?
Here's the code.
Private WithEvents msgInterceptor As MessageInterceptor
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
msgInterceptor = New
MessageInterceptor(InterceptionAction.NotifyAndDelete, True)
msgInterceptor.MessageCondition = New
MessageCondition(MessageProperty.Body,
MessagePropertyComparisonType.StartsWith, "?", True)
AddHandler msgInterceptor.MessageReceived, AddressOf
smsInterceptor_MessageReceived
End Sub
Private Sub smsInterceptor_MessageReceived(ByVal sender As Object, ByVal
e As MessageInterceptorEventArgs)
Dim message As Microsoft.WindowsMobile.PocketOutlook.SmsMessage =
CType(e.Message, Microsoft.WindowsMobile.PocketOutlook.SmsMessage)
MessageBox.Show(message.Body)
End Sub