Condividi tramite


SmsManager.SendMultipartTextMessage Metodo

Definizione

Overload

SendMultipartTextMessage(String, String, IList<String>, IList<PendingIntent>, IList<PendingIntent>)

Inviare un SMS basato su più parti.

SendMultipartTextMessage(String, String, IList<String>, IList<PendingIntent>, IList<PendingIntent>, Int64)

Inviare un SMS basato su più parti.

SendMultipartTextMessage(String, String, IList<String>, IList<PendingIntent>, IList<PendingIntent>, String, String)

Metodo simile a #sendMultipartTextMessage(String, String, ArrayList, ArrayList, ArrayList) Con un argomento aggiuntivo.

SendMultipartTextMessage(String, String, IList<String>, IList<PendingIntent>, IList<PendingIntent>)

Inviare un SMS basato su più parti.

[Android.Runtime.Register("sendMultipartTextMessage", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;)V", "")]
public void SendMultipartTextMessage (string? destinationAddress, string? scAddress, System.Collections.Generic.IList<string>? parts, System.Collections.Generic.IList<Android.App.PendingIntent>? sentIntents, System.Collections.Generic.IList<Android.App.PendingIntent>? deliveryIntents);
[<Android.Runtime.Register("sendMultipartTextMessage", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;)V", "")>]
member this.SendMultipartTextMessage : string * string * System.Collections.Generic.IList<string> * System.Collections.Generic.IList<Android.App.PendingIntent> * System.Collections.Generic.IList<Android.App.PendingIntent> -> unit

Parametri

destinationAddress
String

indirizzo a cui inviare il messaggio

scAddress
String

è l'indirizzo del centro servizi o null per usare l'SMSC predefinito corrente

parts
IList<String>

di ArrayList stringhe che, in ordine, costituiscono il messaggio originale

sentIntents
IList<PendingIntent>

se non null, un ArrayList di PendingIntents (uno per ogni parte del messaggio) che viene trasmesso quando la parte del messaggio corrispondente è stata inviata. Il codice del risultato sarà Activity.RESULT_OK per esito positivo o uno di questi errori:<br>RESULT_ERROR_GENERIC_FAILURE<>RESULT_ERROR_RADIO_OFF<>RESULT_ERROR_NULL_PDU<>RESULT_ERROR_NO_SERVICE<>RESULT_ERROR_LIMIT_EXCEEDED<>RESULT_ERROR_FDN_CHECK_FAILURE<>RESULT_ERROR_SHORT_CODE_NOT_ALLOWED<>RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED<>RESULT_RADIO_NOT_AVAILABLE<>RESULT_NETWORK_REJECT<>RESULT_INVALID_ARGUMENTS<>RESULT_INVALID_STATE<>RESULT_NO_MEMORY<>RESULT_INVALID_SMS_FORMAT<>RESULT_SYSTEM_ERROR<>RESULT_MODEM_ERROR<>RESULT_NETWORK_ERROR<>RESULT_ENCODING_ERROR<>RESULT_INVALID_SMSC_ADDRESS<>RESULT_OPERATION_NOT_ALLOWED<Br>RESULT_INTERNAL_ERROR<><RESULT_NO_RESOURCESbr br>brRESULT_RIL_ENCODING_ERR<>RESULT_CANCELLED<>RESULT_REQUEST_NOT_SUPPORTED<>RESULT_NO_BLUETOOTH_SERVICE<>RESULT_INVALID_BLUETOOTH_ADDRESS<>RESULT_BLUETOOTH_DISCONNECTED<>RESULT_UNEXPECTED_EVENT_STOP_SENDING<>RESULT_SMS_BLOCKED_DURING_EMERGENCY<>RESULT_SMS_SEND_RETRY_FAILED<>RESULT_REMOTE_EXCEPTION<>RESULT_NO_DEFAULT_SMS_APP<>RESULT_RIL_RADIO_NOT_AVAILABLE<>RESULT_RIL_SMS_SEND_FAIL_RETRY<>RESULT_RIL_NETWORK_REJECT<>RESULT_RIL_INVALID_STATE<>RESULT_RIL_INVALID_ARGUMENTS<>RESULT_RIL_NO_MEMORY<>RESULT_RIL_REQUEST_RATE_LIMITED<>RESULT_RIL_INVALID_SMS_FORMAT<>RESULT_RIL_SYSTEM_ERR<>RESULT_RIL_INVALID_SMSC_ADDRESS<br>>><<RESULT_RIL_NETWORK_ERR>RESULT_RIL_INTERNAL_ERR<>RESULT_RIL_REQUEST_NOT_SUPPORTEDRESULT_RIL_MODEM_ERR<RESULT_RIL_OPERATION_NOT_ALLOWED><>RESULT_RIL_NETWORK_NOT_READY><RESULT_RIL_NO_RESOURCESRESULT_RIL_INVALID_MODEM_STATE><<RESULT_RIL_CANCELLEDRESULT_RIL_SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED><<>RESULT_RIL_SIM_ABSENTRESULT_RIL_ACCESS_BARRED<><RESULT_RIL_BLOCKED_DUE_TO_CALL<>> For RESULT_ERROR_GENERIC_FAILURE o uno qualsiasi degli errori RESULT_RIL, sentIntent può includere l'extra "errorCode" contenente un valore specifico della tecnologia radio, generalmente utile solo per risoluzione dei problemi.<Br>

deliveryIntents
IList<PendingIntent>

se non null, un ArrayList di PendingIntents (uno per ogni parte del messaggio) trasmesso quando la parte del messaggio corrispondente è stata recapitata al destinatario. Il pdu non elaborato del report di stato si trova nei dati estesi ("pdu").

Attributi

Commenti

Inviare un SMS basato su più parti. Il chiamato deve avere già diviso il messaggio in parti di dimensioni corrette chiamando divideMessage.

<p class="note"><strong>Note:</strong> Using this method richiede che l'app disponga dell'autorizzazione android.Manifest.permission#SEND_SMS .</p>

<p class="note"><strong>Note:</strong> A partire da Android 4.4 (livello API 19), se <em>e solo se</em> un'app non è selezionata come app SMS predefinita, il sistema scrive automaticamente i messaggi inviati con questo metodo al provider SMS (l'app SMS predefinita è sempre responsabile della scrittura dei messaggi inviati al provider SMS). Per informazioni sul comportamento dell'app SMS predefinita, vedere android.provider.Telephony.</p>

<p class="note"><strong>Note:</strong> Se #getDefault() viene usata per creare un'istanza di questo gestore in un dispositivo multi-SIM, questa operazione potrebbe non riuscire a inviare il messaggio SMS perché non è stata trovata alcuna sottoscrizione predefinita appropriata. In questo caso, se sentIntent è diverso da null, verrà PendingIntent inviato con un codice RESULT_ERROR_GENERIC_FAILURE di errore e una stringa "noDefault" aggiuntiva contenente il valore truebooleano . Per #getDefault() altre informazioni sulle condizioni in cui l'operazione potrebbe non riuscire, vedere . </p>

Documentazione java per android.telephony.SmsManager.sendMultipartTextMessage(java.lang.String, java.lang.String, java.util.ArrayList<java.lang.String>, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>).

Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dal progetto Open Source Android e usato in base ai termini descritti nella licenza Creative Commons 2.5 Attribuzione.

Si applica a

SendMultipartTextMessage(String, String, IList<String>, IList<PendingIntent>, IList<PendingIntent>, Int64)

Inviare un SMS basato su più parti.

[Android.Runtime.Register("sendMultipartTextMessage", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;J)V", "", ApiSince=30)]
public void SendMultipartTextMessage (string destinationAddress, string? scAddress, System.Collections.Generic.IList<string> parts, System.Collections.Generic.IList<Android.App.PendingIntent>? sentIntents, System.Collections.Generic.IList<Android.App.PendingIntent>? deliveryIntents, long messageId);
[<Android.Runtime.Register("sendMultipartTextMessage", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;J)V", "", ApiSince=30)>]
member this.SendMultipartTextMessage : string * string * System.Collections.Generic.IList<string> * System.Collections.Generic.IList<Android.App.PendingIntent> * System.Collections.Generic.IList<Android.App.PendingIntent> * int64 -> unit

Parametri

destinationAddress
String

indirizzo a cui inviare il messaggio

scAddress
String

è l'indirizzo del centro servizi o null per usare l'SMSC predefinito corrente

parts
IList<String>

>codice <ArrayList</codice> di stringhe che, in ordine, costituiscono il messaggio originale

sentIntents
IList<PendingIntent>

se non null, un <oggetto>ArrayList</codice> di <codice>PendingIntent</code>s (uno per ogni parte del messaggio) trasmesso quando la parte del messaggio corrispondente è stata inviata. Il codice del risultato sarà <codice>Activity.RESULT_OK</codice> per l'esito positivo o uno di questi errori:<<> codice>br RESULT_ERROR_GENERIC_FAILURE</codice><br><>RESULT_ERROR_RADIO_OFF</codice><br>><< RESULT_ERROR_NULL_PDU/codice><br><>codice RESULT_ERROR_NO_SERVICE</codice><br RESULT_ERROR_LIMIT_EXCEEDED/codice br<>del codice>RESULT_ERROR_LIMIT_EXCEEDED</codice br><>><<RESULT_ERROR_FDN_CHECK_FAILURE/code><br><code>RESULT_ERROR_SHORT_CODE_NOT_ALLOWED</><code br><>code RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED</code><br><code>RESULT_RADIO_NOT_AVAILABLE</code><br><code>RESULT_NETWORK_REJECT</code><br><>code RESULT_INVALID_ARGUMENTS</code><br code RESULT_INVALID_STATE/code br<>code>RESULT_INVALID_STATE</code><Br><codice>RESULT_NO_MEMORY</code><br<>code>RESULT_INVALID_SMS_FORMAT</code><br<>>code RESULT_SYSTEM_ERROR</code><br><code>RESULT_MODEM_ERROR</code><br<>code>RESULT_NETWORK_ERROR</code><br<>code>RESULT_ENCODING_ERROR</code><br><code>RESULT_INVALID_SMSC_ADDRESS</code br code><>><<RESULT_OPERATION_NOT_ALLOWED/code><br<>code>RESULT_INTERNAL_ERROR</code><br<>>code RESULT_NO_RESOURCES</code><br<>code>RESULT_CANCELLED</code><br<>code>RESULT_REQUEST_NOT_SUPPORTED</code><br code>RESULT_NO_BLUETOOTH_SERVICE</code><br<>><code RESULT_INVALID_BLUETOOTH_ADDRESS></code><br><code>RESULT_BLUETOOTH_DISCONNECTED</code><br><code>RESULT_UNEXPECTED_EVENT_STOP_SENDING</code><br><code>RESULT_SMS_BLOCKED_DURING_EMERGENCY</code><br<>code>RESULT_SMS_SEND_RETRY_FAILED</code><br><code>RESULT_REMOTE_EXCEPTION</code><br><code RESULT_NO_DEFAULT_SMS_>><><Codice>< RESULT_RIL_RADIO_NOT_AVAILABLE</codice><br<>>< RESULT_RIL_SMS_SEND_FAIL_RETRY/codice><br<>codice>RESULT_RIL_NETWORK_REJECT</codice><br RESULT_RIL_INVALID_STATE/><codice RESULT_RIL_INVALID_ARGUMENTS< br><<>>>< RESULT_RIL_NO_MEMORY/codice br codice br RESULT_RIL_NO_MEMORY</><codice br><>><Br><codice>RESULT_RIL_REQUEST_RATE_LIMITED</code><br>><code RESULT_RIL_INVALID_SMS_FORMAT</code><br>><code RESULT_RIL_SYSTEM_ERR</code><br><code>RESULT_RIL_ENCODING_ERR</code><br<>code>RESULT_RIL_INVALID_SMSC_ADDRESS</code><br><code>RESULT_RIL_MODEM_ERR</code><br><code RESULT_><RIL_NETWORK_ERR/code><br<>code>RESULT_RIL_INTERNAL_ERR</><code br>><code RESULT_RIL_REQUEST_NOT_SUPPORTED</code><br><code>RESULT_RIL_INVALID_MODEM_STATE</code><br<>code>RESULT_RIL_NETWORK_NOT_READY</code><br><code>RESULT_RIL_OPERATION_NOT_ALLOWED</code><br><code RESULT_RIL_NO_> CODICE RESOURCES</code><br<>RESULT_RIL_CANCELLED></code><br><code>RESULT_RIL_SIM_ABSENT</code><br><code>RESULT_RIL_SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED</code><br<>code>RESULT_RIL_ACCESS_BARRED</code br><code>RESULT_RIL_BLOCKED_DUE_TO_CALL</code><><br> For <code RESULT_ERROR_><GENERIC_FAILURE/codice> o uno degli errori di RESULT_RIL, sentIntent può includere il valore aggiuntivo "errorCode" contenente un valore specifico della tecnologia radio, in genere utile solo per la risoluzione dei problemi.<Br>

deliveryIntents
IList<PendingIntent>

se non null, un <codice>ArrayList</codice> di <codice>PendingIntent</code>s (uno per ogni parte del messaggio) trasmesso quando la parte del messaggio corrispondente è stata recapitata al destinatario. Il pdu non elaborato del report di stato si trova nei dati estesi ("pdu").

messageId
Int64

ID che identifica in modo univoco il messaggio richiesto per l'invio. Usato per scopi di registrazione e diagnostica. L'ID può essere 0.

Attributi

Commenti

Inviare un SMS basato su più parti. Uguale a #sendMultipartTextMessage(String, String, ArrayList, ArrayList, ArrayList), ma aggiunge un messageId facoltativo.

Documentazione java per android.telephony.SmsManager.sendMultipartTextMessage(java.lang.String, java.lang.String, java.util.List<java.lang.String>, java.util.List<android.app.PendingIntent>, java.util.List<android.app.PendingIntent>, long).

Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dal progetto Open Source Android e usato in base ai termini descritti nella licenza Creative Commons 2.5 Attribuzione.

Si applica a

SendMultipartTextMessage(String, String, IList<String>, IList<PendingIntent>, IList<PendingIntent>, String, String)

Metodo simile a #sendMultipartTextMessage(String, String, ArrayList, ArrayList, ArrayList) Con un argomento aggiuntivo.

[Android.Runtime.Register("sendMultipartTextMessage", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;)V", "", ApiSince=30)]
public void SendMultipartTextMessage (string destinationAddress, string? scAddress, System.Collections.Generic.IList<string> parts, System.Collections.Generic.IList<Android.App.PendingIntent>? sentIntents, System.Collections.Generic.IList<Android.App.PendingIntent>? deliveryIntents, string packageName, string? attributionTag);
[<Android.Runtime.Register("sendMultipartTextMessage", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;)V", "", ApiSince=30)>]
member this.SendMultipartTextMessage : string * string * System.Collections.Generic.IList<string> * System.Collections.Generic.IList<Android.App.PendingIntent> * System.Collections.Generic.IList<Android.App.PendingIntent> * string * string -> unit

Parametri

destinationAddress
String

indirizzo a cui inviare il messaggio

scAddress
String

è l'indirizzo del centro servizi o null per usare l'SMSC predefinito corrente

parts
IList<String>

>codice <ArrayList</codice> di stringhe che, in ordine, costituiscono il messaggio originale

sentIntents
IList<PendingIntent>

se non null, un <oggetto>ArrayList</codice> di <codice>PendingIntent</code>s (uno per ogni parte del messaggio) trasmesso quando la parte del messaggio corrispondente è stata inviata. Il codice del risultato sarà <codice>Activity.RESULT_OK</codice> per l'esito positivo o uno di questi errori:<<> codice>br RESULT_ERROR_GENERIC_FAILURE</codice><br><>RESULT_ERROR_RADIO_OFF</codice><br>><< RESULT_ERROR_NULL_PDU/codice><br><>codice RESULT_ERROR_NO_SERVICE</codice><br RESULT_ERROR_LIMIT_EXCEEDED/codice br<>del codice>RESULT_ERROR_LIMIT_EXCEEDED</codice br><>><<RESULT_ERROR_FDN_CHECK_FAILURE/code><br><code>RESULT_ERROR_SHORT_CODE_NOT_ALLOWED</><code br><>code RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED</code><br><code>RESULT_RADIO_NOT_AVAILABLE</code><br><code>RESULT_NETWORK_REJECT</code><br><>code RESULT_INVALID_ARGUMENTS</code><br code RESULT_INVALID_STATE/code br<>code>RESULT_INVALID_STATE</code><Br><codice>RESULT_NO_MEMORY</code><br<>code>RESULT_INVALID_SMS_FORMAT</code><br<>>code RESULT_SYSTEM_ERROR</code><br><code>RESULT_MODEM_ERROR</code><br<>code>RESULT_NETWORK_ERROR</code><br<>code>RESULT_ENCODING_ERROR</code><br><code>RESULT_INVALID_SMSC_ADDRESS</code br code><>><<RESULT_OPERATION_NOT_ALLOWED/code><br<>code>RESULT_INTERNAL_ERROR</code><br<>>code RESULT_NO_RESOURCES</code><br<>code>RESULT_CANCELLED</code><br<>code>RESULT_REQUEST_NOT_SUPPORTED</code><br code>RESULT_NO_BLUETOOTH_SERVICE</code><br<>><code RESULT_INVALID_BLUETOOTH_ADDRESS></code><br><code>RESULT_BLUETOOTH_DISCONNECTED</code><br><code>RESULT_UNEXPECTED_EVENT_STOP_SENDING</code><br><code>RESULT_SMS_BLOCKED_DURING_EMERGENCY</code><br<>code>RESULT_SMS_SEND_RETRY_FAILED</code><br><code>RESULT_REMOTE_EXCEPTION</code><br><code RESULT_NO_DEFAULT_SMS_>><><Codice>< RESULT_RIL_RADIO_NOT_AVAILABLE</codice><br<>>< RESULT_RIL_SMS_SEND_FAIL_RETRY/codice><br<>codice>RESULT_RIL_NETWORK_REJECT</codice><br RESULT_RIL_INVALID_STATE/><codice RESULT_RIL_INVALID_ARGUMENTS< br><<>>>< RESULT_RIL_NO_MEMORY/codice br codice br RESULT_RIL_NO_MEMORY</><codice br><>><Br><codice>RESULT_RIL_REQUEST_RATE_LIMITED</code><br>><code RESULT_RIL_INVALID_SMS_FORMAT</code><br>><code RESULT_RIL_SYSTEM_ERR</code><br><code>RESULT_RIL_ENCODING_ERR</code><br<>code>RESULT_RIL_INVALID_SMSC_ADDRESS</code><br><code>RESULT_RIL_MODEM_ERR</code><br><code RESULT_><RIL_NETWORK_ERR/code><br<>code>RESULT_RIL_INTERNAL_ERR</><code br>><code RESULT_RIL_REQUEST_NOT_SUPPORTED</code><br><code>RESULT_RIL_INVALID_MODEM_STATE</code><br<>code>RESULT_RIL_NETWORK_NOT_READY</code><br><code>RESULT_RIL_OPERATION_NOT_ALLOWED</code><br><code RESULT_RIL_NO_> CODICE RESOURCES</code><br<>RESULT_RIL_CANCELLED></code><br><code>RESULT_RIL_SIM_ABSENT</code><br><code>RESULT_RIL_SIMULTANEOUS_SMS_AND_CALL_NOT_ALLOWED</code><br<>code>RESULT_RIL_ACCESS_BARRED</code br><code>RESULT_RIL_BLOCKED_DUE_TO_CALL</code><><br> For <code RESULT_ERROR_><GENERIC_FAILURE/codice> o uno degli errori di RESULT_RIL, sentIntent può includere il valore aggiuntivo "errorCode" contenente un valore specifico della tecnologia radio, in genere utile solo per la risoluzione dei problemi.<Br>

deliveryIntents
IList<PendingIntent>

se non null, un <codice>ArrayList</codice> di <codice>PendingIntent</code>s (uno per ogni parte del messaggio) trasmesso quando la parte del messaggio corrispondente è stata recapitata al destinatario. Il pdu non elaborato del report di stato si trova nei dati estesi ("pdu").

packageName
String

funge da nome del pacchetto predefinito se il nome del pacchetto associato all'ID utente è Null.

attributionTag
String
Attributi

Commenti

Metodo simile a #sendMultipartTextMessage(String, String, ArrayList, ArrayList, ArrayList) Con un argomento aggiuntivo.

<p class="note"><strong>Note:</strong> Questo metodo è destinato all'uso interno del framework di telefonia e non attiverà mai una finestra di dialogo di disambiguazione SMS. Se questo metodo viene chiamato in un dispositivo con più sottoscrizioni attive, questa SmsManager istanza è stata creata con #getDefault()e non viene definita alcuna sottoscrizione predefinita definita dall'utente, l'ID sottoscrizione associato a questo messaggio non sarà VALIDO, il che comporterà l'invio dell'SMS nella sottoscrizione associata allo slot logico 0. Usare #getSmsManagerForSubscriptionId(int) per assicurarsi che l'SMS venga inviato nella sottoscrizione corretta. </p>

Documentazione java per android.telephony.SmsManager.sendMultipartTextMessage(java.lang.String, java.lang.String, java.util.List<java.lang.String>, java.util.List<android.app.PendingIntent>, java.util.List<android.app.PendingIntent>, java.lang.String, java.lang.String).

Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dal progetto Open Source Android e usato in base ai termini descritti nella licenza Creative Commons 2.5 Attribuzione.

Si applica a