Use SmsManager to send information. smsManager is a default instance of SmsManager. SmsManager smsManager = SmsManager. getDefault ();
SmsManager. sendTextMessage (destinationAddress, s
Android Basics Getting Started Tutorial--10.2 Smsmanager (SMS manager)tags (space delimited): Android Basics Getting Started TutorialIntroduction to this section:
This section brings in the Android Smsmanager (short-term manager), known as the name, is used to manag
System services provided by Android-SmsManager)
System services provided by Android-SmsManager)
-- Reprinted with the source: coder-pig
Introduction and illustration of SmsManager:
VcD4KPHA + PGJyPgo8L3A + signature + CjxwPjxzdHJvbmc + signature + Signature = "bru
Explanation of SmsManager for Android Development
SmsManager is another very common service provided by Android. SmsManager provides a series of sendXxxMessage () methods for sending text messages.
SmsManager: Manages SMS operatio
We can call the short message service through intent, but it can also be sent through smsmanager;
I. Why do I need to develop a text message sender?
Although the app for sending text messages already exists in the Android system, it is convenient to integrate the SMS sending function when developing other apps.
Ii. develop SMS senders
Purpose: Install the application on the 5554 simulator and send it to t
--smsmanager of system services provided by Android (SMS manager) --Reprint Please specify Source: Coder-pigSmsmanager Related introduction and use diagram:Of course, in order to facilitate everyone, put the code sticky, you do not bother to write code:Copy and paste it when you need it!1) Call the system to send SMS functions:public void Sendsmsto (String phonenumber,string message) { //Determines wh
Smsmanager Public methods:
ARRAYLIST string >NBSP; dividemessage (String text) When the SMS exceeds the maximum length of the SMS message, divide the text message into chunks. parameters: text--initial message, cannot be empty return value: Ordered arrayliststring>, can be re-assembled as the initial message
Static smsmanager getdefault () Gets the default instance of
Smsmanager-windows Phone PC SMS management tool when checking for version updates, the text content between the two special strings in this page is crawled (3 total) and replaced by \ n is a newline, and the HTML escape character is the original character.Wpsmsmanager0-start "1.2" End-wpsmsmanager0Wpsmsmanager1-start "new version V1.2 released (2015/4/10) \ n Update description: \ n can export SMS to Android
This article mainly introduces the example of a small program for sending text messages in Android development. It also includes an upgraded text message sending example for listening to the broadcast receiver, for more information about how to send text messages in Android development, see this article. This article also provides an upgraded text message sending example for listening to broadcast receivers
Currently, text and PDU (Protocol Data Unit) are commonly used for sending short messages. Use text mode to send and receive short message code simple, easy to achieve, but the biggest drawback is not to send and receive Chinese text messages, and
First, we need to put a picture in disguise. You can put a few more beautiful pictures of your wife. Otherwise, the program will be uninstalled one day, and it will be a tragedy, I have taken a photo of beautiful women for simple purposes. I prefer beautiful women, haha.
[Java]Package com. example. smslistener;Import java. text. SimpleDateFormat;Import java. util. Date;Import java. util. List;Import android. content. BroadcastReceiver;Import
, SENTPI, DELIVERPI);}}After the operation, send the text message successfully, you can see the following interface:
Figure 5, enhanced SMS (i)5, SMS Enhancements (ii)The next enhancement is to enable SMS to send binary data. To send data to use the Senddatamessage method of the Smsmanager class, similar to the Sendtextmessage method, except that the method has one more parameter for the target port, the process of building the SMS is not described he
(). toString ();
message = Edittext2.gettext (). toString ();
In Logcat You can view information about number and message log.i ("number", number);
LOG.I ("message", message); /* Get the system default information manager, it is important to note that Smsmanager is Android.telephony.SmsManager; This is related to the version we use and should be used before Android 2.0 Android
The Android API provides the Smsmanager class to process SMS. The sendtextmessage (num, NULL, content, pend, NULL) functions are sent, as described below:
Main classes of SMS involved Smsmanager
Implementation SMS is mainly used in the Smsmanager class, which inherits from the Java.lang.Object class, and below we int
longitude PonitDouble object
Obtains the x of the PonitDouble object of the latitude.
Save location data to SP
Receive command sending location text message
Start the service, get the Intent object where the SMS is received, and call the startService () method of the Context object.
Obtain the location information saved in the SP.
Send SMS, SmsManager. getDefault (). sendTextMessage () method, which sends a text message to a security number. paramete
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.