aboutsummaryrefslogtreecommitdiffstats
path: root/com/nxp/nfc/NfcConstants.java
blob: ec1cffc46894a0a05625dc7d1ac67f6bfd636163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
/*
*
*  The original Work has been changed by NXP Semiconductors.
*
*  Copyright (C) 2013-2014 NXP Semiconductors
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*
*/

package com.nxp.nfc;

import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;

    /**
     * This class provides the constants ID types.
     */

public final class NfcConstants {
    /**
     * UICC ID to be able to select it as the default Secure Element
     */
    public static final String UICC_ID = "com.nxp.uicc.ID";

    /**
     *@hide
     */
    public static final int UICC_ID_TYPE = 2;

    /**
     * UICC2 ID to be able to select it as the default Secure Element
     */
    public static final String UICC2_ID = "com.nxp.uicc2.ID";

    /**
     *@hide
     */
    public static final int UICC2_ID_TYPE = 4;

    /**
     * eSE ID to be able to select it as the default Secure Element
     */
    public static final String SMART_MX_ID = "com.nxp.smart_mx.ID";

    /**
     *@hide
     */
    public static final int SMART_MX_ID_TYPE = 1;
    /**
     * UICC ID to be able to select it as the default Secure Element
     */

    /**
     * ID to be able to select all Secure Elements
     * @hide
     */
    public static final String ALL_SE_ID = "com.nxp.all_se.ID";

    /**
     *
     */
    public static final String HOST_ID = "com.nxp.host.ID";

    /**
     *@hide
     */
    public static final int HOST_ID_TYPE = 0;

    /** fw version major number
     * @hide
     */
    static final byte PN553_FW_MAJOR_NUM = 1;

    /** fw ROM code version
     * @hide
     */
    static final byte PN553_FW_ROM_VER = 0x11;

    /**
     * mpos mode status
     */
    public static final int MPOS_STATUS_SUCCESS = 0x00;

    public static final int MPOS_STATUS_BUSY = 0xEB;

    public static final int MPOS_STATUS_REJECTED = 0x01;

    /**
     * parameter for configuring RF poll
     */
    public static final int LOW_POWER = 0x00;

    public static final int ULTRA_LOW_POWER = 0x01;

    /**
     * Broadcast Action: Multiple card presented to emvco reader.
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_EMVCO_MULTIPLE_CARD_DETECTED =
            "com.nxp.action.EMVCO_MULTIPLE_CARD_DETECTED";

    /**
     * Broadcast Action: a transaction with a secure element has been detected.
     *
     * Always contains the extra field
     * {@link com.nxp.nfc.NfcConstants#EXTRA_AID} and {@link com.nxp.nfc.NfcConstants#EXTRA_SOURCE}
     *
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_TRANSACTION_DETECTED =
            "com.nxp.action.TRANSACTION_DETECTED";

    /**
     * Mandatory byte array extra field in
     * {@link com.nxp.nfc.NfcConstants#ACTION_TRANSACTION_DETECTED}.
     * <p>
     * Contains the AID of the applet involved in the transaction.
     *
     */
    public static final String EXTRA_AID = "com.nxp.extra.AID";

    /**
     * Mandatory byte array extra field in
     * {@link com.nxp.nfc.NfcConstants#ACTION_TRANSACTION_DETECTED}.
     * <p>
     * Contains the extra data of the applet involved in the transaction.
     *
     */
    public static final String EXTRA_DATA = "com.nxp.extra.DATA";

    /**
     * Broadcast Action: a connectivity event coming from the UICC/ESE
     * has been detected.
     * <p>
     * Always contains the extra field
     * {@link com.nxp.nfc.NfcConstants#EXTRA_SOURCE}
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_CONNECTIVITY_EVENT_DETECTED =
            "com.nxp.action.CONNECTIVITY_EVENT_DETECTED";

    /**
     * Mandatory string extra field in
     * {@link com.nxp.nfc.NfcConstants#ACTION_TRANSACTION_DETECTED} and
     * {@link com.nxp.nfc.NfcConstants#ACTION_CONNECTIVITY_EVENT_DETECTED}.
     * <p>
     * Contains the event source (UICC/ESE) of the transaction.
     *
     */
    public static final String EXTRA_SOURCE = "com.nxp.extra.SOURCE";

    /**
     * Intent received when the SWP Reader is Requested by Application
     *
     */
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_NFC_MPOS_READER_MODE_START_SUCCESS = "com.nxp.nfc_extras.action.NFC_MPOS_READER_MODE_START_SUCCESS";

    /**
     * Intent received when the SWP Reader is Requested by Application
     *
     */
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_NFC_MPOS_READER_MODE_START_FAIL = "com.nxp.nfc_extras.action.NFC_MPOS_READER_MODE_START_FAIL";

    /**
     * Intent received when the SWP Reader is disconnected from card.
     *
     */
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_NFC_MPOS_READER_MODE_STOP_SUCCESS = "com.nxp.nfc_extras.action.NFC_MPOS_READER_MODE_STOP_SUCCESS";

    /**
     * Intent received when the SWP Reader transcation is done.
     *
     */
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_NFC_MPOS_READER_MODE_REMOVE_CARD = "com.nxp.nfc_extras.action.NFC_MPOS_READER_MODE_REMOVE_CARD";

    /**
     * Intent received when the SWP Reader gets timeout.
     *
     */
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_NFC_MPOS_READER_MODE_TIMEOUT = "com.nxp.nfc_extras.action.NFC_MPOS_READER_MODE_TIMEOUT";

    /**
     * Intent received when the SWP Reader needs to restart.
     *
     */
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_NFC_MPOS_READER_MODE_RESTART = "com.nxp.nfc_extras.action.NFC_MPOS_READER_MODE_RESTART";


    public static final String ACTION_ROUTING_TABLE_FULL = "nfc.intent.action.AID_ROUTING_TABLE_FULL";

    public static final String PERMISSIONS_NFC = "android.permission.NFC";

    public static final String ACTION_CHECK_X509 = "org.simalliance.openmobileapi.service.ACTION_CHECK_X509";
    public static final String SET_PACKAGE_NAME = "org.simalliance.openmobileapi.service";
    public static final String EXTRA_SE_NAME = "org.simalliance.openmobileapi.service.EXTRA_SE_NAME";
    public static final String EXTRA_PKG = "org.simalliance.openmobileapi.service.extra.EXTRA_PKG";
    public static final String EXTRA_RESULT = "org.simalliance.openmobileapi.service.extra.EXTRA_RESULT";

    public static final String ACTION_CHECK_X509_RESULT = "org.simalliance.openmobileapi.service.ACTION_CHECK_X509_RESULT";

    /**
     * Indicates the states of an APDU service.
     * Service is enabled only when the commit to routing table is successful
     */
    public static final int SERVICE_STATE_DISABLED  = 0;
    public static final int SERVICE_STATE_ENABLED   = 1;
    public static final int SERVICE_STATE_ENABLING  = 2;
    public static final int SERVICE_STATE_DISABLING = 3;


}