Functional Requirements:
After an article, if the SIM card changes, then send an alert SMS to the security number
Receive the SMS sent from the security number, if the content is an alarm command, then according to the corresponding alarm command to make the corresponding operation
Send SMS1. Create a Smsmanager objectSmsmanager manager = Smsman
To define an action for a broadcast receiver:
Copy Code code as follows:
private static final String TAG = "SMSService";
/**
* Information Send status Broadcast
*/
private static final String action_sms_send = "com. Smsservice.send ";
/**
* Information Receive status broadcast
*/
private static final String action_sms_delivery = "com. Smsservice.delivery ";
/**
* Information Rece
Receive SMS and SMS
Recently, I read the text message reception content in the first line of code and summarized it.
1. When the mobile phone receives a text message, the system will send a broadcast of android. provider. Telephy. SMS_RECEIVER. This broadcast carries all the data of the text message.
2. first define the xml file
2. MainActivity
Public class Main
Each cell phone has a text message receiving and sending function, below we through the code to achieve receiving and sending SMS functions.
One, receive SMS1, create the internal broadcast receiver class, receive system issued by SMS broadcast2, from the content to resolve the text message sender and
Recent project requirements need to send SMS and receive verification code and display the verification code in the input box the following is my record premise---Permissions"Android.permission.SEND_SMS">"Android.permission.RECEIVE_SMS">"Android.permission.READ_SMS">1. Send a text message and prompt for a successful delivery and whether the recipient received the package Com.javen.utils;import Java.util.arr
Recent project requirements need to send SMS and receive verification code and display the verification code in the input box the following is my recordPrerequisites---permissionsuses-permissionAndroid:name= "Android.permission.SEND_SMS">uses-permission>uses-permissionAndroid:name= "Android.permission.RECEIVE_SMS">uses-permission> uses-permissionAndroid:name= "Android.permission.READ_SMS">uses-permission>
Android broadcasts Android.provider.Telephony.SMS_RECEIVED messages when it receives text messages, so you can receive text messages by defining a receiver and listening to the message.
You can also add a priority to Intent-filter:
This allows the application to receive the Android.provider.Telephony.SMS_RECEIVED message before the system because of higher priority.Java files:
Package
Effect: Click Send Text message to start sending SMSShow the text message when you receive itThe code is as follows:I. Statement of authoritySecond, the Code implementationOur SMS features are used in the two main classes of Smsmanager and Smsmessage.When the SMS is not received, manually in the application management of the app's
We also talked about the failure to receive SMS messages from LG p350.
Unfortunately, when I bought the p350, I didn't think the phone could not receive the text message. At the beginning, the text message reception was normal, but after half a year, I found this problem. My friend said, I sent a text message, but I never received it. Sometimes, I couldn't
Sending and receiving text messages should be one of the most basic features of every cell phone, even if the old phone many years ago will have this feature, and Android as an excellent smartphone operating system, naturally, there is no support in this regard. Today we start by creating a simple app that sends and receives text messages.Directory Navigation
Receive SMS
Send
This example for you to share the Android create send and receive SMS application of the simple implementation process for your reference, the specific content as follows
First, receive SMS
The structure of the project is as follows: A simple function of receiving and sending SMS
Receive SMSThere are two ways to receive incoming SMS: polling terminal; using eventspolling terminals can be used on a regular basis The at+cmgl=0 instruction reads the unread fetch instruction. The method is simple, but many times do not work hard, inefficient, generally not recommended. The following is the main explanation of event law:Instructions:At+cnmi=Pa
To the users of the motorcycle software in detail to share the message can not receive the verification code problem Solving tutorial.
Tutorial Sharing:
1, check whether you have installed SMS interception software, if there can be uninstalled or shut down interception software, in this use SMS verification can be;
2, in the registration page, s
Receive the SMS class with the following codeFor receive SMS private Smsreceiver msmsreceiver; @Override protected void Onresume () {super.onresume (); Msmsreceiver = new Smsreceiver (); Intentfilter intentfilter = new Intentfilter (); Intentfilter.addaction ("Android.provider.Telephony.SMS_
Query SMS:1 . Query all text messages with the same statusdirective: At+cmgl=nwhere n represents the number of 0-4. 0--unread text messages. Executes the command and then changes itself to read. 1--read SMS. 2--Draft. 3--SMS has been sent. 4--AllReturn (example):+cmgl:76,3,,200891683108200805f011620d91683194041338f50000ff0530972d8603--Serial number3--Status: Send
convenient for testing)ATE183. Check and set character sets:At+cscs=?8+cscs: ("GSM", "UCS2")indicates that the terminal supports GSM and UCS2 two kinds of character sets. General for Chinese environment set to UCS2At+cscs= "UCS2" 84. Get SMS Center number:At+csca? 8+csca: "+8613800280500", 1455. Query and set the SMS format:Enquiry: At+cmgf= 8return:+CMGF: (0)0 represents the PDU mode. Your device may have
Online shopping for Valentine's Day with the force of business SMS marketing attack
The Spring Festival holiday just past, Valentine's Day and lightly. Valentine's Day every year, each year to give what gifts and painstaking effort. and gift-giving has always been more prudent, more headaches. Businesses tend to raise prices every day, it seems that the festival is how sweet, before the festival has much p
telecom to get text messages, and then sold to users, of course, there are preferential packages, this is generally large companies or have to send text messages to users of the business will buy.First we go to register an account (in fact, to get the 5 free short interest to test our program), in order to make the process clear, I try to write more detail, please see the following interface:
Like these names Ah, email ah can be casually filled, mobile phone fill their own line, because y
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.