Skip to content

Commit f0ce975

Browse files
committed
v2.2.140412
Added support of Dongguan Tong [by horseluke]
1 parent 7a023c5 commit f0ce975

6 files changed

Lines changed: 84 additions & 74 deletions

File tree

AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.sinpo.xnfc"
4-
android:versionCode="10"
5-
android:versionName="2.1.140306" >
4+
android:versionCode="11"
5+
android:versionName="2.2.140412" >
66

77
<uses-sdk
88
android:minSdkVersion="10"

res/values-zh-rCN/strings.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<string name="app_name">NFCard</string>
4-
<string name="font_oem1">fonts/oem1.ttf</string>
5-
<string name="font_oem2">fonts/oem2.ttf</string>
6-
<string name="font_oem3">fonts/oem3.ttf</string>
7-
3+
4+
<string name="app_name">NFCard</string>
5+
<string name="font_oem1">fonts/oem1.ttf</string>
6+
<string name="font_oem2">fonts/oem2.ttf</string>
7+
<string name="font_oem3">fonts/oem3.ttf</string>
88
<string name="spec_prop_id">应用</string>
99
<string name="spec_prop_serial">卡号:\u0020</string>
1010
<string name="spec_prop_param">参数:\u0020</string>
@@ -28,13 +28,13 @@
2828
<string name="spec_app_quickpass">银联闪付卡</string>
2929
<string name="spec_app_octopus_hk">香港八达通</string>
3030
<string name="spec_app_changantong">长安通</string>
31+
<string name="spec_app_dongguantong">东莞通</string>
3132
<string name="spec_app_wuhantong">武汉城市一卡通</string>
3233
<string name="spec_app_beijing">北京市政交通卡</string>
3334
<string name="spec_app_shanghai">上海公交卡</string>
3435
<string name="spec_app_debit">借记卡</string>
35-
<string name="spec_app_credit">信用卡</string>
36-
<string name="spec_app_qcredit">准贷记卡</string>
37-
36+
<string name="spec_app_credit">信用卡</string>
37+
<string name="spec_app_qcredit">准贷记卡</string>
3838
<string name="info_nfc_notsupport">
3939
<![CDATA[
4040
<t_tip>没有找到NFC硬件,程序无法工作。</t_tip>
@@ -71,7 +71,7 @@
7171
<br /><t_splitter><br />
7272
<br />NFCard使用手机NFC读取非接触式IC卡中的信息。<br />
7373
<br />支持ISO7816-4、Felica智能卡,用来读取电子钱包(主要是公交卡)中没有设置读取限制的余额、交易记录。<br />
74-
<br />已经确认可以读出的卡片有:深圳通卡(新版)、上海公交卡、香港八达通卡、北京市政一卡通(新版)、西安长安通卡、武汉城市一卡通、银联闪付卡。<br />
74+
<br />已经确认可以读出的卡片有:深圳通(新版)、上海公交卡、香港八达通、北京市政一卡通(新版)、西安长安通、东莞通、武汉城市一卡通、银联闪付卡。<br />
7575
<br />本程序免费、开源。允许自由传播和修改,具体的规则请遵照自由软件基金会的通用公共授权第三版(GUN GPLv3),参见 <a href="http://www.gnu.org/licenses/">www.gnu.org/licenses</a>。<br />
7676
<br />最新版的程序和源代码可以从<a href="http://code.google.com/p/nfcard/">code.google.com/p/nfcard</a>获取。<br />
7777
<br />作者:<a href="mailto:sinpowei@gmail.com">sinpowei</a>, 2014.

res/values-zh-rTW/strings.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<string name="app_name">NFCard</string>
4-
<string name="font_oem1">fonts/oem1.ttf</string>
5-
<string name="font_oem2">fonts/oem2.ttf</string>
6-
<string name="font_oem3">fonts/oem3hk.ttf</string>
73

4+
<string name="app_name">NFCard</string>
5+
<string name="font_oem1">fonts/oem1.ttf</string>
6+
<string name="font_oem2">fonts/oem2.ttf</string>
7+
<string name="font_oem3">fonts/oem3hk.ttf</string>
88
<string name="spec_prop_id">應用</string>
99
<string name="spec_prop_serial">號碼:\u0020</string>
1010
<string name="spec_prop_param">參數:\u0020</string>
@@ -28,13 +28,13 @@
2828
<string name="spec_app_quickpass">銀聯閃付卡</string>
2929
<string name="spec_app_octopus_hk">香港八達通卡</string>
3030
<string name="spec_app_changantong">長安通</string>
31+
<string name="spec_app_dongguantong">東莞通</string>
3132
<string name="spec_app_wuhantong">武漢城市一卡通</string>
3233
<string name="spec_app_beijing">北京市政交通卡</string>
3334
<string name="spec_app_shanghai">上海公交卡</string>
3435
<string name="spec_app_debit">儲蓄卡</string>
35-
<string name="spec_app_credit">信用卡</string>
36-
<string name="spec_app_qcredit">准貸記卡</string>
37-
36+
<string name="spec_app_credit">信用卡</string>
37+
<string name="spec_app_qcredit">准貸記卡</string>
3838
<string name="info_nfc_notsupport">
3939
<![CDATA[
4040
<t_tip>未能偵測NFC,NFCard只支援備有NFC的手機。</t_tip>
@@ -71,7 +71,7 @@
7171
<br /><t_splitter><br />
7272
<br />NFCard使用手機NFC讀取非接觸式IC卡中的資訊。<br />
7373
<br />支援ISO7816-4、Felica智能卡,用來讀取電子錢包(主要是電子收費卡)中沒有設置讀取限制的餘額、交易記錄。<br />
74-
<br />已經確認可以讀出的卡片有:深圳通卡(新版)、上海公交卡、香港八達通卡、北京市政一卡通(新版)、西安長安通卡、武漢城市一卡通、銀聯閃付卡。<br />
74+
<br />已經確認可以讀出的卡片有:深圳通(新版)、上海公交卡、香港八達通、北京市政一卡通(新版)、西安長安通、東莞通、武漢城市一卡通、銀聯閃付卡。<br />
7575
<br />本程式免費、代碼公開。允許自由傳播和修改,具體的規則請遵照自由軟體基金會的通用公眾授權條款第三版(GUN GPLv3),參見 <a href="http://www.gnu.org/licenses/">www.gnu.org/licenses</a>。<br />
7676
<br />最新版的程式和代碼可以從<a href="http://code.google.com/p/nfcard/">code.google.com/p/nfcard</a>獲取。<br />
7777
<br />作者:<a href="mailto:sinpowei@gmail.com">sinpowei</a>, 2014.

res/values/strings.xml

Lines changed: 59 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,75 +2,79 @@
22
<resources>
33

44
<string name="app_name">NFCard</string>
5-
<string name="font_oem1">fonts/oem1.ttf</string>
6-
<string name="font_oem2">fonts/oem2.ttf</string>
7-
<string name="font_oem3">fonts/oem3.ttf</string>
8-
9-
<string name="spec_prop_id">Application</string>
10-
<string name="spec_prop_serial">Serial:\u0020</string>
11-
<string name="spec_prop_param">Parameter:\u0020</string>
12-
<string name="spec_prop_version">Version:\u0020</string>
13-
<string name="spec_prop_date">Validity:\u0020</string>
14-
<string name="spec_prop_currency">Currency:\u0020</string>
15-
<string name="spec_prop_count">Transactions:\u0020</string>
16-
<string name="spec_prop_ecash">E-Cash:\u0020</string>
17-
<string name="spec_prop_balance">Balance:\u0020</string>
18-
<string name="spec_prop_tlimit">EC Single Transaction Limit:\u0020</string>
19-
<string name="spec_prop_dlimit">EC Balance Limit:\u0020</string>
20-
<string name="spec_prop_translog">Transaction Logs:</string>
21-
<string name="spec_prop_access">Access denied</string>
22-
<string name="spec_prop_exception">Error:</string>
23-
24-
<string name="spec_cur_unknown"></string>
25-
<string name="spec_cur_usd">USD</string>
26-
<string name="spec_cur_cny">CNY</string>
27-
<string name="spec_cur_hkd">HKD</string>
28-
29-
<string name="spec_app_unknown">Unknown Application</string>
30-
<string name="spec_app_shenzhentong">Shenzhen Tong</string>
31-
<string name="spec_app_quickpass">QuickPass (China UnionPay)</string>
32-
<string name="spec_app_octopus_hk">Octopus Card (Hong Kong)</string>
33-
<string name="spec_app_changantong">Changan Tong</string>
34-
<string name="spec_app_wuhantong">Wuhan City Smart Card</string>
35-
<string name="spec_app_beijing">Beijing Municipal Card</string>
36-
<string name="spec_app_shanghai">Shanghai Card</string>
37-
<string name="spec_app_debit">Debit Card</string>
38-
<string name="spec_app_credit">Credit Card</string>
39-
<string name="spec_app_qcredit">Quasi-credit cards</string>
40-
41-
<string name="info_nfc_notsupport"><![CDATA[
5+
<string name="font_oem1">fonts/oem1.ttf</string>
6+
<string name="font_oem2">fonts/oem2.ttf</string>
7+
<string name="font_oem3">fonts/oem3.ttf</string>
8+
<string name="spec_prop_id">Application</string>
9+
<string name="spec_prop_serial">Serial:\u0020</string>
10+
<string name="spec_prop_param">Parameter:\u0020</string>
11+
<string name="spec_prop_version">Version:\u0020</string>
12+
<string name="spec_prop_date">Validity:\u0020</string>
13+
<string name="spec_prop_currency">Currency:\u0020</string>
14+
<string name="spec_prop_count">Transactions:\u0020</string>
15+
<string name="spec_prop_ecash">E-Cash:\u0020</string>
16+
<string name="spec_prop_balance">Balance:\u0020</string>
17+
<string name="spec_prop_tlimit">EC Single Transaction Limit:\u0020</string>
18+
<string name="spec_prop_dlimit">EC Balance Limit:\u0020</string>
19+
<string name="spec_prop_translog">Transaction Logs:</string>
20+
<string name="spec_prop_access">Access denied</string>
21+
<string name="spec_prop_exception">Error:</string>
22+
<string name="spec_cur_unknown"></string>
23+
<string name="spec_cur_usd">USD</string>
24+
<string name="spec_cur_cny">CNY</string>
25+
<string name="spec_cur_hkd">HKD</string>
26+
<string name="spec_app_unknown">Unknown Application</string>
27+
<string name="spec_app_shenzhentong">Shenzhen Tong</string>
28+
<string name="spec_app_quickpass">QuickPass (China UnionPay)</string>
29+
<string name="spec_app_octopus_hk">Octopus Card (Hong Kong)</string>
30+
<string name="spec_app_changantong">Changan Tong</string>
31+
<string name="spec_app_dongguantong">Dongguan Tong</string>
32+
<string name="spec_app_wuhantong">Wuhan City Smart Card</string>
33+
<string name="spec_app_beijing">Beijing Municipal Card</string>
34+
<string name="spec_app_shanghai">Shanghai Card</string>
35+
<string name="spec_app_debit">Debit Card</string>
36+
<string name="spec_app_credit">Credit Card</string>
37+
<string name="spec_app_qcredit">Quasi-credit cards</string>
38+
<string name="info_nfc_notsupport">
39+
<![CDATA[
4240
<t_tip>No NFC hardware found, NFcard will NOT work.</t_tip>
43-
]]></string>
44-
<string name="info_nfc_disabled"><![CDATA[
41+
]]>
42+
</string>
43+
<string name="info_nfc_disabled">
44+
<![CDATA[
4545
<t_tip>NFC hardware has been disabled, Please enable it first. <br /><br />Touch<b> <t_action_nfc>HERE</b></t_action_nfc> to turn it on.</t_tip>
46-
]]></string>
47-
<string name="info_nfc_nocard"><![CDATA[
46+
]]>
47+
</string>
48+
<string name="info_nfc_nocard">
49+
<![CDATA[
4850
<t_tip>No card has been read, Please take the card near to the back cover of phone and try again.</t_tip>
49-
]]></string>
50-
51-
<string name="info_nfc_error"><![CDATA[
51+
]]>
52+
</string>
53+
<string name="info_nfc_error">
54+
<![CDATA[
5255
<t_tip>
5356
<b>Error occurred when reading card.</b><br />
5457
When reading card, Please take your card close to the NFC antenna of phone (Normally, It is at back cover of the phone) and hold a few seconds so that program can read data out. If fails too much, you can try turn off then on NFC and read agian.<br />
5558
</t_tip>
56-
]]></string>
57-
58-
<string name="info_nfc_unknown"><![CDATA[
59+
]]>
60+
</string>
61+
<string name="info_nfc_unknown">
62+
<![CDATA[
5963
<t_tip><b>Unknown card.</b> <br />Touch <t_action_help><b>HERE</b></t_action_help> to see currently supported cards.</t_tip>
60-
]]></string>
61-
64+
]]>
65+
</string>
6266
<string name="info_main_copied">Card information has been copied to clipboard</string>
63-
64-
<string name="info_main_about">
65-
<![CDATA[
67+
<string name="info_main_about">
68+
<![CDATA[
6669
<div><t_head1><app /></t_head1> <version />
6770
<br /><t_splitter><br />
6871
<br />NFCard can read contactless IC card use NFC hadware.<br />
6972
<br />Support ISO7816-4, Felica compliant e-wallet, It can read account balance and transaction logs from these cards if no read restriction.<br />
70-
<br />So far we\'ve confirmed the following can be read: ShenzhenTong Card (newer version) of Shenzhen, Shanghai Card, Octopus Card of Hongkong, Beijing Municipal Card (newer version), Changan Card of Shaanxi,Xi\'an, Wuhan City Smart Card, Quickpass (China UnionPay).<br />
73+
<br />So far we\'ve confirmed the following can be read: Shenzhen Tong (newer version) of Shenzhen, Shanghai Card, Octopus Card of Hongkong, Beijing Municipal Card (newer version), Changan Card of Shaanxi,Xi\'an, Dongguan Tong, Wuhan City Smart Card, Quickpass (China UnionPay).<br />
7174
<br />This is a free and opensource software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, Either version 3 of the license, or (at your option) any later version. See <a href="http://www.gnu.org/licenses/">www.gnu.org/licenses</a>.<br />
7275
<br />Newest version and source code can be found at <a href="http://code.google.com/p/nfcard/">code.google.com/p/nfcard</a><br />
7376
<br />By <a href="mailto:sinpowei@gmail.com">sinpowei</a>, 2014.</div>
7477
]]>
75-
</string>
76-
</resources>
78+
</string>
79+
80+
</resources>

src/com/sinpo/xnfc/SPEC.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ public enum APP {
6262
BEIJINGMUNICIPAL(R.string.spec_app_beijing),
6363
WUHANTONG(R.string.spec_app_wuhantong),
6464
CHANGANTONG(R.string.spec_app_changantong),
65+
// Added by horseluke<horseluke@126.com> 2014.3.31
66+
DONGGUANTONG(R.string.spec_app_dongguantong),
6567
SHANGHAIGJ(R.string.spec_app_shanghai),
6668
DEBIT(R.string.spec_app_debit),
6769
CREDIT(R.string.spec_app_credit),

src/com/sinpo/xnfc/nfc/reader/pboc/CityUnion.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ protected void parseInfo21(Application app, Iso7816.Response data, int dec,
5151
if (d[2] == 0x20 && d[3] == 0x00) {
5252
applicationId = SPEC.APP.SHANGHAIGJ;
5353
bigEndian = true;
54+
} else if (d[2] == 0x52 && d[3] == 0x30) {
55+
// Added by horseluke<horseluke@126.com> 2014.3.31
56+
applicationId = SPEC.APP.DONGGUANTONG;
57+
bigEndian = false;
5458
} else {
5559
applicationId = SPEC.APP.CHANGANTONG;
5660
bigEndian = false;

0 commit comments

Comments
 (0)