I found a network with the oxygen control to send SMS C # source code, try to debug a bit, found really good, and easy to use. But the drawback is that in the text message will automatically add control company information, registration will cancel this information, but the registration needs a small amount of money.
I downloaded the free PC connectivity SDK3.0 directly on Nokia's website and found that it could achieve the same function after debugging. The following program is successful in sending a text message under Nokia8310 with infrared connection computer.
After installing SDK3.0, add COM components to the reference in the Nokia Setting Adapter for PC Suite 3.7 and nokiacl messaging.
To add a reference:
Using Sttngs3a_slib;
Using Nokiaclmessaging;
Using System.Text;
public void Send_sms (string sms_number, String sms_content)?//parameter is data number and send content
{
Try
{
Sttngs3a_slib.phoneinfo_suite3 phonestatus = new Sttngs3a_slib.phoneinfo_suite3 ();
Sttngs3a_slib.devnotifyopt Devstatus;
Phonestatus.get_devicestatus (out devstatus);? Determine if the phone is connected to a PC
if (devstatus.tostring () = = "attached")
{
Nokiaclmessaging.shortmsgadapter smsobj = new Nokiaclmessaging.shortmsgadapterclass ();
Nokiaclmessaging.shortmessageitem smsentry = new Nokiaclmessaging.shortmessageitemclass ();
Smsentry.type = NokiaCLMessaging.ShortMessageType.SHORTMESSAGE_TYPE_GSM_SUBMIT;
Igsmsubmit submitobj = (igsmsubmit) smsentry.typeproperties;
Conversion encoding
UnicodeEncoding ustring = new UnicodeEncoding ();
byte[] input = Ustring.getbytes (sms_content. Trim ());
SDK3.0 support for most of the current popular mobile phones, if it is more old-fashioned mobile phones, please download SDK2.1 on the Nokia website, supporting some of the mobile phone in the SDK3.0 of another component of Nokia SMS Adapter (PC Suite 3.7), Specific models of mobile phones see the SDK's documentation. If the database is used, then the company's computers can send text messages through a mobile phone, is also a good choice of communication. Of course, SDK3.0 can also implement many other functions, carefully study the SDK documentation, you can receive SMS, mobile phone settings and other functions.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.