CN106067049A - A kind of Android client card reading method based on NFC technique - Google Patents
A kind of Android client card reading method based on NFC technique Download PDFInfo
- Publication number
- CN106067049A CN106067049A CN201610615979.2A CN201610615979A CN106067049A CN 106067049 A CN106067049 A CN 106067049A CN 201610615979 A CN201610615979 A CN 201610615979A CN 106067049 A CN106067049 A CN 106067049A
- Authority
- CN
- China
- Prior art keywords
- nfc
- card
- tag recognition
- recognition event
- reading method
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000008569 process Effects 0.000 claims abstract description 7
- 238000004891 communication Methods 0.000 abstract description 8
- 238000005516 engineering process Methods 0.000 abstract description 6
- 238000010295 mobile communication Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000006698 induction Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K17/00—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
- G06K17/0022—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K17/00—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
- G06K17/0022—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device
- G06K17/0029—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device the arrangement being specially adapted for wireless interrogation of grouped or bundled articles tagged with wireless record carriers
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention provides a kind of Android client card reading method based on NFC technique, belong to mobile communication technology field, when user needs to identify nfc card, first start the NFC module of mobile device, obtained the label information of nfc card by NFC module, now, label distribution system creation intent, after NFC Service receives tag recognition event, NFC Service broadcasts described tag recognition event, NFC activity processes tag recognition event subsequently, and parses above-mentioned NDEF message from which.The Android client card reader of present invention offer and card reading method, simple to operate, practical, the interworking of mobile phone and card can be done directly by Android mobile phone client and mobile phone NFC module, thus replace NFC contactless card reader and the conventional communication mode of card the most on the market, facilitate user and technical staff to move office.
Description
Technical field
The present invention relates to mobile communication technology field, especially relate to a kind of Android client Card Reader based on NFC technique
Method.
Background technology
NFC (Near Filed Communication, near-field communication technology) is by non-contact radio-frequency identification (RFID)
And the Technology Integration that interconnects develops, combining induction card reader, vicarious card and point-to-point on one chip
Function, can be identified with compatible equipment and data exchange in short distance.
In prior art, as it is shown in figure 1, NFC card reading method generally uses NFC contactless card reader equipment, NFC noncontact
Reader device is connected with computer computer, installs card reader software on computers by NFC contactless card reader equipment
Communicating with nfc card sheet, above-mentioned NFC Card Reader scenario-frame is complicated, portability is poor, needs by computer and card reader ability
Complete the reading writing working with nfc card, it is impossible to meet the actual demand of mobile office.
Summary of the invention
It is an object of the invention to provide a kind of Android client card reading method based on NFC technique, pass through Android mobile phone
Client and mobile phone NFC module are done directly the interworking of mobile phone and card, thus replace NFC noncontact the most on the market and read
Card device and the conventional communication mode of card, facilitate user and technical staff to move office.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that
A kind of Android client card reading method based on NFC technique, comprises the following steps:
Start the NFC module of mobile device, and obtained the label information of nfc card by described NFC module;
Label distribution system creation intent, wherein, encapsulates the label information of described nfc card in described intent;
NFC HAL obtains NDEF message from the label information of described nfc card;
NFC HAL sends tag recognition event to NFC Service, and wherein, described tag recognition event includes described
NDEF message;
Described NFC Service receives described tag recognition event, and broadcasts described tag recognition event;
NFC activity processes described tag recognition event, parses described NDEF and disappear from described tag recognition event
Breath, and described NDEF message is shown.
1, further, described intent is TECH_DISCOVERED intent.
The invention have the benefit that
A kind of Android client card reading method based on NFC technique, when user needs to identify nfc card, first starts movement
The NFC module of equipment, then obtains the label information of nfc card by NFC module;Afterwards, label distribution system creation intent,
This intent encapsulates the label information of above-mentioned nfc card, and now, NFC HAL obtains NDEF from the label information of nfc card and disappears
Breath, NFC HAL sends tag recognition event to NFC Service again, after NFC Service receives tag recognition event,
NFC Service broadcasts this tag recognition event;Subsequently, NFC activity receives tag recognition event, and knows from label
Parsing described NDEF message in other event, the NDEF message being resolved to shown, above-mentioned card reading method is simple to operate, real
Strong by property, the interworking of mobile phone and card can be done directly by Android mobile phone client and mobile phone NFC module, thus take
Generation NFC contactless card reader the most on the market and the conventional communication mode of card, facilitate user and technical staff to move and do
Public.
Android client card reader and card reading method that the present invention provides are simple to operate, practical, can pass through Android
Cell-phone customer terminal and mobile phone NFC module are done directly the interworking of mobile phone and card, thus replace that NFC is non-on the market at present connects
Touch the conventional communication mode of card reader and card, facilitate user and technical staff to move office.
Accompanying drawing explanation
In order to be illustrated more clearly that technical scheme, the accompanying drawing used required in embodiment will be made below
Introduce simply, it should be apparent that, the accompanying drawing in describing below is only some embodiments of the present invention, general for this area
From the point of view of logical technical staff, on the premise of not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the NFC card reading method schematic diagram of prior art;
Fig. 2 is the schematic diagram of a kind of based on NFC technique the Android client card reading method of the embodiment of the present invention;
Fig. 3 is the flow chart of a kind of based on NFC technique the Android client card reading method of the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing 2 and Fig. 3 in embodiment of the present invention, the technical scheme in embodiment of the present invention is entered
Row clearly and completely describes.
Embodiment 1
A kind of Android client card reading method based on NFC technique, comprises the following steps:
S1: start the NFC module of mobile device, and obtained the label information of nfc card by described NFC module.
S2: label distribution system creation intent.
Wherein, described intent encapsulates the label information of described nfc card.
During practical operation, if more than one application program can process above-mentioned intent, then mobile phone interface can eject
One choice box, allows user select to process the Activity of this label.Label distribution system defines 3 kinds of intent, wherein presses
Priority is arranged as from high to low: NDEF_DISCOVERED, TECH_DISCOVERED, TAG_DISCOVERED, and the present invention makes
Use TECH_DISCOVERED intent.If NDEF_DISCOVERED intent do not starts or neither one Activity
Filter detection NDEF_DISCOVERED and this label are known, then this TECH_DISCOVERED Intent will
Start.TECH_DISCOVERED intent requires to specify the technologies list needing to support in resource file.
S3:NFC HAL obtains NDEF message from the label information of described nfc card.
S4:NFC HAL sends tag recognition event to NFC Service, and wherein, described tag recognition event includes described
NDEF message.
S5: described NFC Service receives described tag recognition event, and broadcasts described tag recognition event.
S6:NFC activity processes described tag recognition event, parses described from described tag recognition event
NDEF message, and described NDEF message is shown.
2, further, described intent is TECH_DISCOVERED intent.
In the present embodiment, the Action type using intent-filter is ACTION_TECH_DISCOVERED, and
And use the type label of filter_nfc.xml document definition.
In actual use, user and developer can be calculated by exploitation Android phone client, simulation
The inputting interface of machine-read card device software, completes the input of Application Protocol Data Unit instruction, then calls Android mobile phone client
Middle application programming interface is set up card and to communication port between mobile phone and is carried out Application Protocol Data Unit data command
Process, the interaction design of abundant Card Reader software.
The Android client card reader of present invention offer and card reading method, when user needs to identify nfc card, first start shifting
The NFC module of dynamic equipment, then obtains the label information of nfc card by NFC module;Afterwards, label distribution system creation
Intent, this intent encapsulate the label information of above-mentioned nfc card, and now, NFC HAL obtains from the label information of nfc card
NDEF message, NFC HAL sends tag recognition event to NFC Service again, when NFC Service receives tag recognition thing
After part, NFC Service broadcasts this tag recognition event;Subsequently, NFC activity receives tag recognition event, and from mark
Sign in identification event and parse described NDEF message, the NDEF message being resolved to is shown, the operation letter of above-mentioned card reading method
Single, practical, the interworking of mobile phone and card can be done directly by Android mobile phone client and mobile phone NFC module,
Thus replace NFC contactless card reader and the conventional communication mode of card the most on the market, facilitate user and technical staff to carry out
Mobile office.
It is above the preferred embodiment of the present invention, it is noted that for those skilled in the art,
Under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, these improvements and modifications are also considered as this
Bright protection domain.
Claims (2)
1. an Android client card reading method based on NFC technique, it is characterised in that comprise the following steps:
Start the NFC module of mobile device, and obtained the label information of nfc card by described NFC module;
Label distribution system creation intent, wherein, encapsulates the label information of described nfc card in described intent;
NFC HAL obtains NDEF message from the label information of described nfc card;
NFC HAL sends tag recognition event to NFC Service, and wherein, described tag recognition event includes that described NDEF disappears
Breath;
Described NFC Service receives described tag recognition event, and broadcasts described tag recognition event;
NFC activity processes described tag recognition event, parses described NDEF message from described tag recognition event,
And described NDEF message is shown.
Android client card reading method the most according to claim 1, it is characterised in that described intent is TECH_
DISCOVERED intent。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610615979.2A CN106067049A (en) | 2016-07-29 | 2016-07-29 | A kind of Android client card reading method based on NFC technique |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610615979.2A CN106067049A (en) | 2016-07-29 | 2016-07-29 | A kind of Android client card reading method based on NFC technique |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106067049A true CN106067049A (en) | 2016-11-02 |
Family
ID=57207306
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610615979.2A Pending CN106067049A (en) | 2016-07-29 | 2016-07-29 | A kind of Android client card reading method based on NFC technique |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106067049A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107491706A (en) * | 2017-08-16 | 2017-12-19 | 惠州Tcl移动通信有限公司 | NFC method for testing pressure, system and storage device based on mobile terminal |
CN108038403A (en) * | 2017-12-21 | 2018-05-15 | 东信和平科技股份有限公司 | A kind of card reading method and client based on NFC technique |
CN112199306A (en) * | 2020-09-23 | 2021-01-08 | 建信金融科技有限责任公司 | Information card interface equipment virtualization implementation method and device, electronic equipment and readable storage medium |
WO2021136543A1 (en) * | 2020-01-03 | 2021-07-08 | 飞天诚信科技股份有限公司 | Automatic card connection method, electronic device, and computer readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130344804A1 (en) * | 2012-06-22 | 2013-12-26 | Research In Motion Limited | Nfc transport auto discovery |
CN104915696A (en) * | 2015-07-01 | 2015-09-16 | 浙江工业大学 | Android-platform-based NFC writing and reading method |
-
2016
- 2016-07-29 CN CN201610615979.2A patent/CN106067049A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130344804A1 (en) * | 2012-06-22 | 2013-12-26 | Research In Motion Limited | Nfc transport auto discovery |
CN104915696A (en) * | 2015-07-01 | 2015-09-16 | 浙江工业大学 | Android-platform-based NFC writing and reading method |
Non-Patent Citations (2)
Title |
---|
ANHUIOSS技术分享: "基于Android平台的NFC技术的应用实现", 《ITEYE博客》 * |
李波 等.: "《ANDROID 5从入门到精通》", 30 April 2016 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107491706A (en) * | 2017-08-16 | 2017-12-19 | 惠州Tcl移动通信有限公司 | NFC method for testing pressure, system and storage device based on mobile terminal |
CN107491706B (en) * | 2017-08-16 | 2020-11-13 | 惠州Tcl移动通信有限公司 | NFC pressure testing method and system based on mobile terminal and storage device |
CN108038403A (en) * | 2017-12-21 | 2018-05-15 | 东信和平科技股份有限公司 | A kind of card reading method and client based on NFC technique |
CN108038403B (en) * | 2017-12-21 | 2021-04-16 | 东信和平科技股份有限公司 | Card reading method based on NFC technology and client |
WO2021136543A1 (en) * | 2020-01-03 | 2021-07-08 | 飞天诚信科技股份有限公司 | Automatic card connection method, electronic device, and computer readable storage medium |
CN112199306A (en) * | 2020-09-23 | 2021-01-08 | 建信金融科技有限责任公司 | Information card interface equipment virtualization implementation method and device, electronic equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102100121B (en) | The method and system of multiple application is managed in short-range communication | |
CN103001671B (en) | Systems and methods for providing nfc secure application support in battery-off mode when no nonvolatile memory write access is available | |
JP6573672B2 (en) | NFC communication apparatus and method | |
CN106067049A (en) | A kind of Android client card reading method based on NFC technique | |
CN103150813A (en) | Systems and methods for providing secure nfc application support in battery on and battery off modes | |
CN101866434B (en) | Information processing apparatus, method and program | |
CN104778577A (en) | Intelligent attendance method, attendance device and attendance recording device | |
CN103973444A (en) | Security token and service access system | |
CN103559523B (en) | The contactless read-write device realized based on SWP SE and method | |
CN110545538A (en) | Method for configuring wireless terminal network, mobile terminal, wireless terminal and system | |
CN103544114B (en) | Based on many M1 card control system and the control method thereof of single CPU card | |
CN102510391B (en) | Application management method and device and smart card | |
CN105184337A (en) | Intelligent card application detection method and system for NFC equipment | |
CN103559464B (en) | Social security IC-card personalization method, Apparatus and system | |
EP2793201A1 (en) | Safety information transfer system, device and method based on extended parameter set | |
CN106528007A (en) | Printing control system and printing method thereof | |
EP2672442A1 (en) | Multi-protocol communication circuit | |
CN103701505A (en) | NFC (Near Field Communication) device | |
CN105592406A (en) | Device pairing method and device pairing system | |
CN103186465A (en) | Browser compatibility testing method and system for webpage user interface | |
CN109408127B (en) | Chip system loading method and chip card | |
CN103971422A (en) | Check-in method and device based on electronic business card adopting NFC (Near Field Communication) technology | |
CN104484691B (en) | (U) SIM card personalization method based on android system and system | |
CN102542696A (en) | Security information interaction system and method | |
CN107358271B (en) | Mobile terminal and reading and writing method of identification code thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161102 |
|
RJ01 | Rejection of invention patent application after publication |