Android Learning -- setContentView ()'s past and present, setcontentview

Source: Internet
Author: User

Android Learning -- setContentView ()'s past and present, setcontentview
SmsManagerPublic method:

  • ArrayList <String>DivideMessage(String text)
    When the length of a text message exceeds the maximum length of the SMS message, the text message is divided into several parts.
    Parameters:Text-- The initial message cannot be blank.
    Return Value: OrderedArrayList <String>, Can be combined into an initial message
  • Static SmsManagerGetDefault()
    Obtain the default SmsManager instance.
    Return Value:SmsManagerDefault instance
  • VoidSendDataMessage(String destinationAddress,String scAddress,Short destinationPort,Byte [] data,PendingIntent sentIntent, PendingIntent deliveryIntent)
    Sends SMS-based data to the specified application port.
    Parameters:
    1 ),DestinationAddress-- Target address of the message
    2 ),ScAddress-- The service center address or is null. Use the current default SMSC 3)DestinationPort-- Target Port Number of the message
    4 ),Data-- The message body, that is, the data to be sent by the message
    5 ),SentIntent-- If it is not null, The PendingIntent is broadcast when the message is successfully sent or fails. The result code is Activity. RESULT_ OK, indicating success, or RESULT_ERROR_GENERIC_FAILURE, RESULT_ERROR_RADIO_OFF, RESULT_ERROR_NULL_PDU, indicating an error. Corresponding to RESULT_ERROR_GENERIC_FAILURE,SentIntentIt may include an additional "error code" that contains a specific value of radio broadcast technology, which is generally only useful for fault fixing.
    Every SMS-based application control DetectionSentIntent. IfSentIntentYes, the caller will detect all unknown applications, which will cause a small number of SMS messages to be sent during the detection.
    6 ),DeliveryIntent-- If it is not null, the message is broadcast when it is successfully delivered to the recipient's PendingIntent.
    Exception: IfDestinationAddressOrDataIf it is null, an IllegalArgumentException exception is thrown.
  • VoidSendMultipartTextMessage(String destinationAddress,String scAddress,ArrayList <String> parts,ArrayList <PendingIntent> sentIntents, ArrayList <PendingIntent> DeliverIntents)
    Send a multi-part text message based on SMS.DivideMessage(String text) Splits messages into correct sizes.
    Parameters:
    1 ),DestinationAddress-- Target address of the message
    2 ),ScAddress-- The service center address or is empty. Use the current default SMSC.
    3 ),Parts-- OrderedArrayList <String>, Can be combined into an initial message
    4 ),SentIntents-- FollowSendDataMessageThe method is the same, but here is a set of PendingIntent
    5 ),DeliverIntents-- FollowSendDataMessageThe method is the same, but here is a set of PendingIntent
    Exception: IfDestinationAddressOrDataIf it is null, an IllegalArgumentException exception is thrown.
  • VoidSendTextMessage(String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent)
    Send an SMS-based text. The parameter has the same meaning as the existing one before the exception.

Constant:

  • Public static final intRESULT_ERROR_GENERIC_FAILURE
    Indicates a common error. The value is 1 (0x00000001)
  • Public static final intRESULT_ERROR_NO_SERVICE
    Indicates that the service is currently unavailable. The value is 4 (0x00000004)
  • Public static final intRESULT_ERROR_NULL_PDU
    PDUS are not provided. The value is 3 (0x00000003)
  • Public static final intRESULT_ERROR_RADIO_OFF
    Indicates that the wireless broadcast is explicitly disabled. The value is 2 (0x00000002)
  • Public static final intSTATUS_ON_ICC_FREE
    Free Space. The value is 0 (0x00000000)
  • Public static final intSTATUS_ON_ICC_READ
    Received and read. The value is 1 (0x00000001)
  • Public static final intSTATUS_ON_ICC_SENT
    Storage and sent. Value: 5 (0x00000005)
  • Public static final intSTATUS_ON_ICC_UNREAD
    Received but unread, value: 3 (0x00000003)
  • Public static final intSTATUS_ON_ICC_UNSENT
    Indicates that the data is stored but sent. The value is 7 (0x00000007)

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.