to top
CardEmulation / res / xml /

aid_list.xml

1
<?xml version="1.0" encoding="utf-8"?>
2
<!--
3
Copyright (C) 2013 The Android Open Source Project
4
 
5
Licensed under the Apache License, Version 2.0 (the "License");
6
you may not use this file except in compliance with the License.
7
You may obtain a copy of the License at
8
 
9
     http://www.apache.org/licenses/LICENSE-2.0
10
 
11
Unless required by applicable law or agreed to in writing, software
12
distributed under the License is distributed on an "AS IS" BASIS,
13
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
See the License for the specific language governing permissions and
15
limitations under the License.
16
-->
17
 
18
<!-- This file defines which AIDs this application should emulate cards for.
19
 
20
     Vendor-specific AIDs should always start with an "F", according to the ISO 7816 spec. We
21
     recommended vendor-specific AIDs be at least 6 characters long, to provide sufficient
22
     uniqueness. Note, however, that longer AIDs may impose a burden on non-Android NFC terminals.
23
     AIDs may not exceed 32 characters (16 bytes).
24
 
25
     Additionally, AIDs must always contain an even number of characters, in hexadecimal format.
26
 
27
     In order to avoid prompting the user to select which service they want to use when the device
28
     is scanned, this app must be selected as the default handler for an AID group by the user, or
29
     the terminal must select *all* AIDs defined in the category simultaneously ("exact match").
30
-->
32
<host-apdu-service xmlns:android="http://schemas.android.com/apk/res/android"
33
    android:description="@string/service_name"
34
    android:requireDeviceUnlock="false">
35
    <!--
36
    If category="payment" is used for any aid-groups, you must also add an android:apduServiceBanner
37
    attribute above, like so:
38
 
39
    android:apduServiceBanner="@drawable/settings_banner"
40
 
41
     apduServiceBanner should be 260x96 dp. In pixels, that works out to...
42
       - drawable-xxhdpi: 780x288 px
43
       - drawable-xhdpi:  520x192 px
44
       - drawable-hdpi:   390x144 px
45
       - drawable-mdpi:   260x96  px
46
 
47
    The apduServiceBanner is displayed in the "Tap & Pay" menu in the system Settings app, and
48
    is only displayed for apps which implement the "payment" AID category.
49
 
50
    Since this sample is implementing a non-standard card type (a loyalty card, specifically), we
51
    do not need to define a banner.
52
 
53
    Important: category="payment" should only be used for industry-standard payment cards. If you are
54
        implementing a closed-loop payment system (e.g. stored value cards for a specific merchant
55
        or transit system), use category="other". This is because only one "payment" card may be
56
        active at a time, whereas all "other" cards are active simultaneously (subject to AID
57
        dispatch).
58
    -->
59
 
60
    <aid-group android:description="@string/card_title" android:category="other">
61
        <aid-filter android:name="F222222222"/>
62
    </aid-group>
64
</host-apdu-service>