次の方法で共有


SmsMessage.CalculateLength Method

Definition

Overloads

CalculateLength(ICharSequence, Boolean)
Obsolete.

Calculates the number of SMS's required to encode the message body and the number of characters remaining until the next message, given the current encoding.

CalculateLength(String, Boolean)
Obsolete.

Calculates the number of SMS's required to encode the message body and the number of characters remaining until the next message, given the current encoding.

CalculateLength(ICharSequence, Boolean)

Caution

deprecated

Calculates the number of SMS's required to encode the message body and the number of characters remaining until the next message, given the current encoding.

[Android.Runtime.Register("calculateLength", "(Ljava/lang/CharSequence;Z)[I", "")]
[System.Obsolete("deprecated")]
public static int[]? CalculateLength (Java.Lang.ICharSequence? messageBody, bool use7bitOnly);
[<Android.Runtime.Register("calculateLength", "(Ljava/lang/CharSequence;Z)[I", "")>]
[<System.Obsolete("deprecated")>]
static member CalculateLength : Java.Lang.ICharSequence * bool -> int[]

Parameters

messageBody
ICharSequence

the message to encode

use7bitOnly
Boolean

if true, characters that are not part of the GSM alphabet are counted as a single space char. If false, a messageBody containing non-GSM alphabet characters is calculated for 16-bit encoding.

Returns

Int32[]

an int[4] with int[0] being the number of SMS's required, int[1] the number of code units used, and int[2] is the number of code units remaining until the next message. int[3] is the encoding type that should be used for the message.

Attributes

Remarks

Calculates the number of SMS's required to encode the message body and the number of characters remaining until the next message, given the current encoding.

This member is deprecated. Use android.telephony.SmsMessage.

Java documentation for android.telephony.gsm.SmsMessage.calculateLength(java.lang.CharSequence, boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CalculateLength(String, Boolean)

Caution

deprecated

Calculates the number of SMS's required to encode the message body and the number of characters remaining until the next message, given the current encoding.

[Android.Runtime.Register("calculateLength", "(Ljava/lang/String;Z)[I", "")]
[System.Obsolete("deprecated")]
public static int[]? CalculateLength (string? messageBody, bool use7bitOnly);
[<Android.Runtime.Register("calculateLength", "(Ljava/lang/String;Z)[I", "")>]
[<System.Obsolete("deprecated")>]
static member CalculateLength : string * bool -> int[]

Parameters

messageBody
String

the message to encode

use7bitOnly
Boolean

if true, characters that are not part of the GSM alphabet are counted as a single space char. If false, a messageBody containing non-GSM alphabet characters is calculated for 16-bit encoding.

Returns

Int32[]

an int[4] with int[0] being the number of SMS's required, int[1] the number of code units used, and int[2] is the number of code units remaining until the next message. int[3] is the encoding type that should be used for the message.

Attributes

Remarks

Calculates the number of SMS's required to encode the message body and the number of characters remaining until the next message, given the current encoding.

This member is deprecated. Use android.telephony.SmsMessage.

Java documentation for android.telephony.gsm.SmsMessage.calculateLength(java.lang.String, boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to