Freigeben über


TelephonyManager.IccTransmitApduLogicalChannel Method

Definition

Transmit an APDU to the ICC card over a logical channel.

[Android.Runtime.Register("iccTransmitApduLogicalChannel", "(IIIIIILjava/lang/String;)Ljava/lang/String;", "GetIccTransmitApduLogicalChannel_IIIIIILjava_lang_String_Handler")]
public virtual string? IccTransmitApduLogicalChannel (int channel, int cla, int instruction, int p1, int p2, int p3, string? data);
[<Android.Runtime.Register("iccTransmitApduLogicalChannel", "(IIIIIILjava/lang/String;)Ljava/lang/String;", "GetIccTransmitApduLogicalChannel_IIIIIILjava_lang_String_Handler")>]
abstract member IccTransmitApduLogicalChannel : int * int * int * int * int * int * string -> string
override this.IccTransmitApduLogicalChannel : int * int * int * int * int * int * string -> string

Parameters

channel
Int32

is the channel id to be closed as returned by a successful iccOpenLogicalChannel.

cla
Int32

Class of the APDU command.

instruction
Int32

Instruction of the APDU command.

p1
Int32

P1 value of the APDU command.

p2
Int32

P2 value of the APDU command.

p3
Int32

P3 value of the APDU command. If p3 is negative a 4 byte APDU is sent to the SIM.

data
String

Data to be sent with the APDU.

Returns

The APDU response from the ICC card with the status appended at the end.

Attributes

Remarks

Transmit an APDU to the ICC card over a logical channel.

Input parameters equivalent to TS 27.007 AT+CGLA command.

It is strongly recommended that callers of this API should firstly create a new TelephonyManager instance by calling TelephonyManager#createForSubscriptionId(int). Failure to do so can result in unpredictable and detrimental behavior like callers can end up talking to the wrong SIM card.

Requires Permission: android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE or that the calling app has carrier privileges (see #hasCarrierPrivileges).

Java documentation for android.telephony.TelephonyManager.iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String).

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