[General Questions and Answers] kamilprizka:
Hallo to XDA DEVELOPERS,

Please very much, I want ask for trouble, which I cant solve for many days.

I read many informations about receiving SMS, I tryed many examples of code and I build many codes which are from my head, but it not functioned.

Please, I have very big trouble. Many days I try develope application for receiving SMS, but I cant this.

I can send sms and use mobile and outlook functions, but I CANT RECEIVE SMS.

This is one of my code:

Imports Microsoft.WindowsMobile.PocketOutlook.MessageInterception

Imports Microsoft.WindowsMobile.Telephony

Imports Microsoft.WindowsMobile

Imports Microsoft.WindowsMobile.PocketOutlook

Imports System.Messaging

Imports System

Imports System.Collections.Generic

Imports System.Drawing

Imports System.Text

Imports System.Windows.Forms

Imports Microsoft.WindowsMobile.Status

PublicClass Form1

Private _smsInterceptor As MessageInterceptor

PrivateSub Form1_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMyBase.Load

If MessageInterceptor.IsApplicationLauncherEnabled(_appId) Then

_smsInterceptor = New MessageInterceptor(_appId)

Else

_smsInterceptor = New MessageInterceptor(InterceptionAction.Notify)

_smsInterceptor.MessageCondition = New MessageCondition(MessageProperty.Body, _

MessagePropertyComparisonType.StartsWith, "www")

EndIf

AddHandler _smsInterceptor.MessageReceived, New MessageInterceptorEventHandler(AddressOf SmsInterceptor_MessageReceived)

Display("Event Wired")

EndSub

Sub Display(ByVal text AsString)

TextBox1.Text &= text & vbCrLf

EndSub

PrivateSub SmsInterceptor_MessageReceived(ByVal sender AsObject, ByVal e As MessageInterceptorEventArgs)

Display("Received")

Dim theMessage As SmsMessage = TryCast(e.Message, SmsMessage)

IfNot theMessage IsNothingThen

Display("Msg: " & theMessage.From.Address & " - " & theMessage.Body)

EndIf

EndSub

Const _appId AsString = "sms"

PrivateSub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

If MessageInterceptor.IsApplicationLauncherEnabled(_appId) Then

_smsInterceptor = New MessageInterceptor(_appId)

Else

_smsInterceptor = New MessageInterceptor(InterceptionAction.Notify)

_smsInterceptor.MessageCondition = New MessageCondition(MessageProperty.Body, _

MessagePropertyComparisonType.StartsWith, "www")

EndIf

AddHandler _smsInterceptor.MessageReceived, New MessageInterceptorEventHandler(AddressOf SmsInterceptor_MessageReceived)

EndSub

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

_smsInterceptor.EnableApplicationLauncher(_appId)

EndSub

PrivateSub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

_smsInterceptor.DisableApplicationLauncher()

EndSub

EndClass

' ------------------------------------------------------------------------

But trouble is, that this:

AddHandler _smsInterceptor.MessageReceived, New MessageInterceptorEventHandler(AddressOf SmsInterceptor_MessageReceived)

I thing that this not see incomming message....and I dont know why.....???

When I see registers then in folder INBOX/RULES I see Rules which set this code, but when comes SMS then nothing is happen...

Idont know , what can I do, please very much, very,very, I need help, please for advice.

I have windows mobile 6.3

HTC mobile phone

All is functioned, but receiving sms I cant solve,

please very much for advice

Thank you and nice day