FileDocCategorySizeDatePackage
MEProfile.javaAPI DocphoneME MR2 API (J2ME)21047Wed May 02 18:00:40 BST 2007sim.toolkit

MEProfile

public final class MEProfile extends Object
The MEProfile class contains methods to question the handset profile, regarding the SIM Application Toolkit and supposing that this profile has been set by the Terminal Profile APDU command. The following table gives the index value according to the facility to check. This class contains only static methods, no instance of this class is necessary.



Facility Index
Profile download 0
SMS-PP data download 1
Cell Broadcast data download 2
Menu selection 3
'9E xx' response code for SIM data download error 4
Timer Expiration 5
USSD string data object supported in Call Control 6
Envelope Call Control sent during auto. redial 7
command result 8
Call Control by SIM 9
Cell identity included in Call Control by SIM 10
MO short message control by SIM 11
Handling of the alpha identifier, user indication 12
UCS2 Entry supported 13
UCS2 Display supported 14
Display of the extension Text 15
Proactive SIM: Display Text 16
Proactive SIM: Get Inkey 17
Proactive SIM: Get Input 18
Proactive SIM: More Time 19
Proactive SIM: Play Tone 20
Proactive SIM: Poll Interval 21
Proactive SIM: Polling Off 22
Proactive SIM: Refresh 23
Proactive SIM: Select Item 24
Proactive SIM: Send Short Message 25
Proactive SIM: Send SS 26
Proactive SIM: Send USSD 27
Proactive SIM: Set Up Call 28
Proactive SIM: Set Up Menu 29
Proactive SIM: Provide Local Information 30
Proactive SIM: Provide Local Information (NMR) 31
Proactive SIM: Set Up Event List 32
Event: MT call 33
Event: Call connected 34
Event: Call disconnected 35
Event: Location status 36
Event: User activity 37
Event: Idle screen available 38
Event: Card reader status 39
Event: Language selection 40
Event: Browser termination 41
RFU 42
RFU 43
RFU 44
RFU 45
RFU 46
RFU 47
Proactive SIM: Power ON Card 48
Proactive SIM: Power OFF Card 49
Proactive SIM: Perform Card APDU 50
Proactive SIM: Get Reader Status (reader status) 51
Proactive SIM: Get Reader Status (reader ident.) 52
RFU 53
RFU 54
RFU 55
Proactive SIM: Timer Management (start, stop) 56
Proactive SIM: Timer Management (get cur. value) 57
Proactive SIM: Provide Local Info (date,time...) 58
Binary choice in Get Inkey 59
Set Up Idle Mode Text 60
Run AT Command 61
2nd Alpha Id in Set Up Call 62
2nd Capability configuration par. in Call Control 63
Sustained Display Text 64
Send DTMF 65
Proactive SIM: Provide Local Info. (BCCH) 66
Proactive SIM: Provide Local Info. (language) 67
Proactive SIM: Provide Local Info. (Timing Adv.) 68
Proactive SIM: Language Notification 69
Proactive SIM: Launch Browser 70
RFU 71
Soft keys support for Select Item 72
Soft keys support for Set Up Menu 73
RFU 74
RFU 75
RFU 76
RFU 77
RFU 78
RFU 79
Maximum number of softkeys available (b0) 80
Maximum number of softkeys available (b1) 81
Maximum number of softkeys available (b2) 82
Maximum number of softkeys available (b3) 83
Maximum number of softkeys available (b4) 84
Maximum number of softkeys available (b5) 85
Maximum number of softkeys available (b6) 86
Maximum number of softkeys available (b7) 87
RFU 88
RFU 89
RFU 90
RFU 91
RFU 92
RFU 93
RFU 94
RFU 95
RFU 96
RFU 97
RFU 98
RFU 99
RFU 100
RFU 101
RFU 102
RFU 103
Nb of characters down ME display (b0) 104
Nb of characters down ME display (b1) 105
Nb of characters down ME display (b2) 106
Nb of characters down ME display (b3) 107
Nb of characters down ME display (b4) 108
RFU 109
RFU 110
Screen Sizing parameters supported 111
Nb of characters accross ME display (b0) 112
Nb of characters accross ME display (b1) 113
Nb of characters accross ME display (b2) 114
Nb of characters accross ME display (b3) 115
Nb of characters accross ME display (b4) 116
Nb of characters accross ME display (b5) 117
Nb of characters accross ME display (b6) 118
Variable size fonts supported 119
Display can be resized 120
Text Wrapping supported 121
Text Scrolling supported 122
RFU 123
RFU 124
Width reduction when in a menu (b0) 125
Width reduction when in a menu (b1) 126
Width reduction when in a menu (b2) 127
RFU 128
RFU 129
RFU 130
RFU 131
RFU 132
RFU 133

Example of use in a standard Toolkit applet:


private static final byte PROFILE_USSD = (byte)27;

if (MEProfile.check(PROFILE_USSD) == true) {
// USSD available on the handset
sendTheRequest();
} else {
// abort applet
return;
}
version
8.3.0

Fields Summary
Constructors Summary
private MEProfile()
constructor

    
Methods Summary
public static booleancheck(byte index)
Checks a facility in the handset profile.

param
index the number of the facility to check, according to the table above.
return
true if the facility is supported, false otherwise
exception
ToolkitException with the following reason codes:
  • ME_PROFILE_NOT_AVAILABLE if Terminal Profile data are not available

		return false;
    
public static booleancheck(byte[] mask, short offset, short length)
Checks a set of facilities in the handset profile. The method checks all the facilities corresponding to bits set to 1 in the mask buffer.

Notes:

  • If offset or length parameter is negative an ArrayIndexOutOfBoundsException exception is thrown and no check is performed.
  • If offset+length is greater than mask.length, the length of the mask array an ArrayIndexOutOfBoundsException exception is thrown and no check is performed.

param
mask a byte array containing the mask to compare with the profile
param
offset the starting offset of the mask in the byte array
param
length the length of the mask (at least 1)
return
true if the set of facilities is supported, false otherwise. If length is equal to 0, true is returned.
exception
NullPointerException if mask is null
exception
ArrayIndexOutOfBoundsException if check would cause access of data outside mask array bounds
exception
ToolkitException with the following reason codes:
  • ME_PROFILE_NOT_AVAILABLE if Terminal Profile data are not available

        return false;
    
public static booleancheck(short index)
Checks a facility in the handset profile.

param
index the number of the facility to check, according to the table above.
return
true if the facility is supported, false otherwise
exception
ToolkitException with the following reason codes:
  • ME_PROFILE_NOT_AVAILABLE if Terminal Profile data are not available

        return false;
    
public static shortcopy(short startOffset, byte[] dstBuffer, short dstOffset, short dstLength)
Copies a part of the handset profile in a buffer.

Notes:

  • If dstOffset or dstLength parameter is negative an ArrayIndexOutOfBoundsException exception is thrown and no copy is performed.
  • If dstOffset+dstLength is greater than dstBuffer.length, the length of the dstBuffer array an ArrayIndexOutOfBoundsException exception is thrown and no copy is performed.

param
startOffset offset of the handset profile first byte to be copied
param
dstBuffer destination byte array
param
dstOffset offset within destination byte array to start copy into
param
dstLength byte length to be copy
return
dstOffset + dstLength
exception
ArrayIndexOutOfBoundsException if copy would cause access of data outside array bounds
exception
NullPointerException if dstBuffer is null
exception
ToolkitException with the following reason codes:
  • ME_PROFILE_NOT_AVAILABLE if Terminal Profile data are not available

        return 0;
    
public static shortgetValue(short indexMSB, short indexLSB)
Returns the binary value of a parameter, delimited by two indexes, from the handset profile.

param
indexMSB index of the Most Significant Bit of the handset profile .
param
indexLSB index of the Lowest Significant Bit of the handset profile .
return
binary value of the data field indicated in the handset profile.
exception
ToolkitException with the following reason codes:
  • ME_PROFILE_NOT_AVAILABLE if Terminal Profile data are not available
  • BAD_INPUT_PARAMETER if (indexMSB > indexLSB +16) or (indexMSB < indexLSB) or (indexMSB < 0) or (indexLSB < 0)

        return 0;