How to send text messages in JAVA and send text messages in JAVA
Today, I saw a requirement. I needed to provide a function for sending text messages. I looked for it online. There are several possible methods: (1) using the webse
message = ""; Log.e(TAG, "free message " ); Bundle extras = intent.getExtras(); if ( extras != null ) { try { Object[] smsExtra = (Object[]) extras.get( SMS_EXTRA_NAME ); ContentResolver contentResolver = context.getContentResolver(); Log.e(TAG, "free message " ); for ( int i = 0; i
Register the receiver in AndroidManifest. xml:
Add permission:
Python code, mainly through adb log to obtain the SMS information intercepted by the apk package, an
) swithcvaluechanged: (Uiswitch *) sender{//get the status of the switch//Save switch status to PreferencesNsuserdefaults *userdefu =[Nsuserdefaults Standarduserdefaults]; [Userdefu setBool:sender.isOn forkey:self.item[@"KeyName"]]; [Userdefu Synchronize]; }- (void) SetTime: (NSString *) str{Self.detailTextLabel.text=str; //Give time to preferences to recordNsuserdefaults *userdefu =[Nsuserdefaults Standarduserdefaults]; [Userdefu setobject:str forkey:self.item[@"Detailskeyname"]]; [Userdefu
commands require longer latency, such as opening a network connection command.
Sentcom ("at + cmgs = 18608683863"); // set the target mobile phone number
Delay (100); // The latency is 100 ms. If you can send a text message, a ">" prompt is returned, waiting for the text message to be entered.
Print ("please sent me a message back by QQ, THX"); // send
Many people on the internet use the COM port to connect to the mobile phone, use the mobile phone modem, use the AT command to send text messages, introduce the principles of PDU encoding, and write a ready-made class for reference and use.
Smspduclass. CLs
Option explicit
'Preserve the local variable of the attribute valuePrivate mvarsmsclen as integer local ReplicationPrivate mvarsmsctype as string' local
message, we call simreadmessage. If we can read the text message, we will know its index on the SIM card. We need to store the entire index number in the SMS database. In Windows Mobile, we can use cemapi to operate on text messages. Use iMessage to print the record content of each SIM card
");Post.addrequestheader ("Content-type","APPLICATION/X-WWW-FORM-URLENCODED;CHARSET=GBK");//Set transcoding in header filenamevaluepair[] data = {new Namevaluepair ("Uid", "Registered user name"),New Namevaluepair ("Key", "key is not registered password"),New Namevaluepair ("Smsmob", "Send phone number * * * * * * * * *"),SMS must be a complete SMS (Details Web site) can be issued. The return has been sent successfully, but the phone has not received a text
The reason why the Linux server has fallen for someone who sends a text messaging tool: today's work Product manager said: The company's SMS verification code remaining use of 0650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0062.gif "alt = "J_0062.gif"/>, the first day I check the time there are more than 10,000. Shocked! Shocked! Shocked! Lookup process:One: So check with our third-party SMS operators to communicate, to see the correspondi
This article describes how to use PyFetion to send text messages in python. For more information, see PyFetion. you can easily use python to send text messages using Fetion. the following code is provided:
The code is as follows:
From fetion import *Import OSDef SendSMS (sms ):Myphone = 'xxxxxx'Mypwd = 'oooooooooo
With Pyfetion, it is convenient to use Python to send text messages with Fetion, and the following code is posted:
Copy the Code code as follows:
From fetion Import * Import OS def sendsms (SMS):Myphone = ' xxxxxx 'MyPwd = ' oooooooooo 'Tophone = ' Oxoxoxoxoxox ' Fetion = Pyfetion (myphone,mypwd, ' TCP ')Fetion.login (Fetionhidden)print ' Send to ' +tophoneFet
Reprint Address: Http://hi.baidu.com/jeremylai/item/420f9c9fe4881fccb62531f71. Start Android Emulator and look at the title bar to find the port. Typically Android emulator (5554), where 5554 is the port.2. Open the command line and enter telnet localhost 5554. The program will connect to Android emulator and the console will returnAndroid console:type ' help ' for a list of commandsOk3. Analog phone access. Enter the phone number > for GSM call 4. Analog SMS send. Enter GSM send Android Console
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.