C#Mobile短信截取且不让收信箱跟手机提示收到该短信
C#Mobile短信截取且不让收信箱跟手机提示收到该短信
我想做一个程序截取短信,然后读短信里面的内容..如果内容为:1 则阻止收信箱手到该短信并让手机不提示收到短信......
也就是我收到的短信内容如果是:1则把他丢弃...
如果是其他内容则不丢弃...照常显示
好象可以在截取短信的同时设置截取条件....
MessageInterceptor msgInterceptor = new MessageInterceptor();
msgInterceptor.InterceptionAction = InterceptionAction.NotifyAndDelete;
MessageCondition msgCondition = new MessageCondition();
msgCondition.ComparisonType = MessagePropertyComparisonType.Contains;
msgCondition.Property = MessageProperty.Sender;
msgInterceptor.MessageCondition = msgCondition;
msgInterceptor.MessageReceived += new MessageInterceptorEventHandler(msgInterceptor_MessageReceived);
但是有点不明白....我要设置消息主体的是1而不是消息的发送者....怎么设置