also arranged below 0x20, however, the English letters, Arabic numbers, and common symbols have the same positions. Use the algorithm described above to send and receive short messages in English only. Generally, it is enough. If it is French, German, or Spanish, it contains "?" , "É", according to the above encoding output to look up the table, see the provisions of GSM 03.38.8-bit encoding does not specify specific algorithms.Ucs2 encoding converts
In programming, there will always be some very common needs, perhaps the predecessors have made us a good wheel, but we did not find. This article shares some common functional code snippets.
These PHP snippets are also very helpful for beginners in PHP, so it's easy to learn, so let's start learning ~
1. Send SMS
When developing a Web or mobile app, you'll often encounter the need to send SMS to the user,
IMessage allows your new IPad to send and receive short messages and multimedia messages like a mobile phone. But this is different from the carrier SMS/MMS business, it is through each other's e-mail address to achieve, users need only WiFi or 3G network for data connection, you can complete the communication. However, imessage only supports Apple's own devices,
There are several key points to intercept text messages:
1. android receives text messages in broadcast mode.
2. You only need to add the "receive" SMS permission to your Manifest. xml file.
3. Write a broadcast receiving class.
Public class smsreceiveandmask extends BroadcastReceiver {
Private String TAG = "smsreceiveandmask ";
@ Override
Public void
In Android, SMS is also a type of broadcast. When a text message is sent, the system sends a broadcast. We only need to process broadcast events to read text messages.
Read text message code 1:
Public class smsreceiver extends broadcastreceiver {
Read text message code 2:
/*** Get sms ** @ Param intent * @ return */public final static smsmessage [] getmessagesfro
C # send SMS messages,
At present, many websites use the SMS sending function. How can this function be implemented. For webmasters, it is relatively cost-effective and simple to use the sms api. The steps are as follows:
1. Apply for an account from the Internet (http://sms.webchinese.cn/), remember the user name, the
Other Common FilesIf you want to open some common files, such as HTML, TXT, PDF, PPT, etc., you can use UIWebView openJust tell the URL of the UIWebView file toAs for opening a remote shared resource, such as the HTTP protocol, you can also call the system's own Safari browser:Nsurl *url = [Nsurl urlwithstring:@ "http://www.baidu.com"];[[UIApplication sharedapplication] openurl:url];Sometimes it is necessary to open other applications in this application, such as jumping from A to B application
The following code is from http://blog.csdn.net/hellogv/. for reference, see the source!
The younger brother has a Sony Ericsson k508c. When learning j2-based, he finds that it is midp2.0. Therefore, he uses it to start his mobile development journey. First, add the following library references: Import javax. Wireless. messaging. messageconnection;
Import javax. Wireless. messaging. textmessage; at last, the younger brother provides the function implementation for sending text
the target string.Char ch; // used to save a character// Copy the string lengthNdstlength = nsclength;// ReversingFor (INT I = 0; I {Ch = * psrc ++; // Save the first character* Pdst ++ = * psrc ++; // the character that appears after the copy* Pdst ++ = CH; // copy the first character}// Is the final character 'F?If (* (pDst-1) = 'F '){Pdst --;Ndstlength --; // The length of the target string minus 1.}// Add an ending character to the output string* Pdst = '\ 0 ';// Returns the length of the t
Android SMS reads text messages and can get the sender/recipient's mobile phone number (Address). Contacts contacts can filter the mobile phone number (address), so SMS can use the mobile phone number (address) associate with a contacts Contact
SMS-Contacts association code
// Display name of the contacts Contact ass
Send SMS messages and phone calls to Android virtual machines.
Android emulator already contains the gsm module, which can be used to simulate telephone and text message debugging (you don't have to spend too much money)
First, you must open the VM:
Emulator-avd XXXXXX-scale 0.8
Needless to say, the first parameter is the avd name and the second parameter is the display size.
Then use:
Telnet l
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.