CN104700305A - Method for acquiring two-dimensional code from optional input frame of Android platform - Google Patents
Method for acquiring two-dimensional code from optional input frame of Android platform Download PDFInfo
- Publication number
- CN104700305A CN104700305A CN201310652992.1A CN201310652992A CN104700305A CN 104700305 A CN104700305 A CN 104700305A CN 201310652992 A CN201310652992 A CN 201310652992A CN 104700305 A CN104700305 A CN 104700305A
- Authority
- CN
- China
- Prior art keywords
- quick response
- response code
- input frame
- dimensional code
- invoice
- 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
Landscapes
- Input From Keyboards Or The Like (AREA)
Abstract
The invention discloses a method for acquiring a two-dimensional code from an optional input frame of an Android platform. The method includes intercepting and judging each key value of a key queue; if the key value corresponds to a scan key, starting a two-dimensional code acquisition module, and monitoring the data acquisition succeed broadcast emitted by the two-dimensional code acquisition module; when the data acquisition succeed broadcast emitted by the two-dimensional code acquisition module is monitored, acquiring the key two-dimensional code information acquired by the two-dimensional code acquisition module, and storing the key two-dimensional code information into temporary variables; by means of the inter-process communication mechanism, transmitting the temporary variables to a window manager; allowing the window manager to acquire a current window, acquiring the focus of the input frame of the current window, and arranging the temporary variables into the input frame. An additional system interface is omitted, the data contained by the two-dimensional code can be acquired from an optional input frame of the Android platform conveniently, and the user's experience is improved greatly.
Description
Technical field
The present invention relates to Android system correlative technology field, under a kind of Android platform, in any input frame, obtain the method for two-dimensional code data.
Background technology
Current Android (Android) system is at home and abroad widely used, because it has the features such as increasing income property, intellectuality, ease for use, interface be magnificent and very popular, simultaneously, because Quick Response Code can collect data message more more than bar code, replace one-dimension code at multiple fields Quick Response Code and become inexorable trend, such as, can see the advertisement utilizing Quick Response Code to carry out demonstration in bus stop.User can use Android intelligent terminal to scan Quick Response Code, the more information relevant with this Quick Response Code of further acquisition, very be applicable to business promotion, Information Communication, advertisement pushing etc., the combination of Android intelligent terminal and the Quick Response Code life style of current people is occurred huge change.
Under many circumstances, people wish directly to obtain by Android intelligent terminal scanning Quick Response Code the information comprised in this Quick Response Code, such as, scanning invoice Quick Response Code directly can show the drawer of this invoice on Android intelligent terminal interface, to make out an invoice the amount of money, the information such as the side's of making out an invoice Taxpayer Identification Number, but, the mode distinguishing engine according to third party needs to increase system interface to realize this purpose undoubtedly, and increase the application program of system interface needs exploitation for special interface, not only increase cost, system is also made to become more complicated, therefore need to develop a kind of method obtaining two-dimensional code data under Android platform in internal system.
Summary of the invention
The method of two-dimensional code data is obtained in any input frame, in order to realize obtaining the data comprised in Quick Response Code in any input frame under Android platform under the invention provides a kind of Android platform.
For achieving the above object, obtaining the method for two-dimensional code data under the invention provides a kind of Android platform in any input frame, comprising the following steps:
Each key value in button queue tackled and judged it, if the corresponding scanning key of key value, starts Quick Response Code acquisition module, and starting to monitor the data acquisition successful broadcast that Quick Response Code acquisition module sends;
When listening to the data acquisition successful broadcast that Quick Response Code acquisition module sends, obtaining the Quick Response Code key message that Quick Response Code acquisition module gathers, and Quick Response Code key message is stored in temporary variable;
By the communication mechanism between process, temporary variable is passed to window manager;
Obtain current window by window manager, obtain the focus of input frame in current window, and temporary variable is placed in input frame.
Further, Quick Response Code acquisition module comprises a Quick Response Code scan module and a two dimension code reading module, Quick Response Code scan module obtains two-dimension code image information for scanning two-dimension code image, and it is Quick Response Code key message that two dimension code reading module is used for two-dimension code image information decoding.
Further, when Quick Response Code key message comprises multiple information project, comprise a step of being carried out splitting by Quick Response Code key message further, multiple information projects after fractionation are stored in multiple temporary variable respectively, after acquisition current window, obtain the focus of each input frame in current window successively, and the temporary variable corresponding with this input frame is placed in input frame.
Further, Quick Response Code is the invoice Quick Response Code comprising invoice key message on invoice.
Further, invoice key message comprises following at least one: invoice codes, invoice number, invoice amount, beneficiary Taxpayer Identification Number, paying party Taxpayer Identification Number, date of making out an invoice, drawer.
The present invention is without the need to increasing system interface, achieve the display directly carrying out two-dimensional code data in system, user is any to data acquisition with upload relevant technology without the need to being concerned about, the data comprised in Quick Response Code can be obtained in any input frame easily under Android platform, improve Consumer's Experience greatly.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram obtaining two-dimensional code data under a kind of Android platform of one embodiment of the invention in any input frame.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not paying the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is the method flow diagram obtaining two-dimensional code data under a kind of Android platform of one embodiment of the invention in any input frame, and as shown in the figure, the method includes the steps of:
S110: tackle each key value in button queue and judge it, if the corresponding scanning key of key value, starts Quick Response Code acquisition module, and starts to monitor the data acquisition successful broadcast that Quick Response Code acquisition module sends;
Wherein, Quick Response Code acquisition module comprises a Quick Response Code scan module and a two dimension code reading module, Quick Response Code scan module obtains two-dimension code image information for scanning two-dimension code image, and it is Quick Response Code key message that two dimension code reading module is used for two-dimension code image information decoding.
A hardware signal is all produced after each button of Android platform is pressed, it is a key value that each hardware signal corresponds in Android system, system is fallen in lines to key value and is distributed, key value system intercepted is distributed in current interface, takes different response mechanisms according to the difference of key value.In the present embodiment, system judges it after reading key value, if key value is the value corresponding to scanning key, start Quick Response Code acquisition module, after Quick Response Code acquisition module starts, system then starts to monitor it, in order to carrying out subsequent treatment in time after its data acquisition success.
S120: when listening to the data acquisition successful broadcast that Quick Response Code acquisition module sends, obtains the Quick Response Code key message that Quick Response Code acquisition module gathers, and is stored in temporary variable by Quick Response Code key message;
Wherein, Quick Response Code is the invoice Quick Response Code comprising invoice key message on invoice, invoice key message can comprise: invoice codes, invoice number, invoice amount, beneficiary Taxpayer Identification Number, paying party Taxpayer Identification Number, make out an invoice the date, drawer, the Quick Response Code key message got can comprise above one or more invoice key message, when the Quick Response Code key message got comprises above multinomial invoice key message, further the Quick Response Code key message got is split, and the multiple invoice key messages after splitting are stored in multiple temporary variable respectively.
S130: by the communication mechanism between process, temporary variable is passed to window manager;
S140: obtain current window by window manager, obtains the focus of input frame in current window, and temporary variable is placed in input frame.
After window manager obtains current window, obtain the focus of each input frame in current window successively, and the temporary variable corresponding with this input frame is placed in this input frame, until all temporary variables have all been placed, so just achieve each invoice key message and be presented in the corresponding input frame of current window.
In sum, the present invention by Android platform with camera scanning invoice Quick Response Code can realize the key message demonstrating invoice in Android platform interface, for identifying that true from false of bills provides another means, read or identification equipment without the need to increasing other during use, very simple and practical.Simultaneously, the present invention also can realize the reading to the Quick Response Code comprising other information, such as, user by Android platform with camera scanning comprise the Quick Response Code of food or medicine information, the information relevant with this food or medicine can be presented on Android platform interface, has further understanding with person easy to use to this food or medicine.
The present invention is without the need to increasing system interface, achieve the display directly carrying out two-dimensional code data in system, user is any to data acquisition with upload relevant technology without the need to being concerned about, the data comprised in Quick Response Code can be obtained in any input frame easily under Android platform, improve Consumer's Experience greatly.
One of ordinary skill in the art will appreciate that: accompanying drawing is the schematic diagram of an embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.
One of ordinary skill in the art will appreciate that: the module in the device in embodiment can describe according to embodiment and be distributed in the device of embodiment, also can carry out respective change and be arranged in the one or more devices being different from the present embodiment.The module of above-described embodiment can merge into a module, also can split into multiple submodule further.
Last it is noted that above embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in previous embodiment, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of embodiment of the present invention technical scheme.
Claims (5)
1. obtain a method for two-dimensional code data under Android platform in any input frame, it is characterized in that, comprise the following steps:
Each key value in button queue tackled and judged it, if the corresponding scanning key of key value, starts Quick Response Code acquisition module, and starting to monitor the data acquisition successful broadcast that described Quick Response Code acquisition module sends;
When listening to the data acquisition successful broadcast that described Quick Response Code acquisition module sends, obtaining the Quick Response Code key message that described Quick Response Code acquisition module gathers, and described Quick Response Code key message is stored in temporary variable;
By the communication mechanism between process, described temporary variable is passed to window manager;
Obtain current window by described window manager, obtain the focus of input frame in current window, and described temporary variable is placed in input frame.
2. under Android platform according to claim 1, in any input frame, obtain the method for two-dimensional code data, it is characterized in that, described Quick Response Code acquisition module comprises a Quick Response Code scan module and a two dimension code reading module, described Quick Response Code scan module obtains two-dimension code image information for scanning two-dimension code image, and it is described Quick Response Code key message that described two dimension code reading module is used for described two-dimension code image information decoding.
3. under Android platform according to claim 1, in any input frame, obtain the method for two-dimensional code data, it is characterized in that, when described Quick Response Code key message comprises multiple information project, comprise a step of being carried out splitting by described Quick Response Code key message further, multiple information projects after fractionation are stored in multiple temporary variable respectively, after acquisition current window, obtain the focus of each input frame in current window successively, and the temporary variable corresponding with this input frame is placed in input frame.
4. obtain the method for two-dimensional code data under Android platform according to claim 1 in any input frame, it is characterized in that, described Quick Response Code is the invoice Quick Response Code comprising invoice key message on invoice.
5. under Android platform according to claim 4, in any input frame, obtain the method for two-dimensional code data, it is characterized in that, described invoice key message comprises following at least one: invoice codes, invoice number, invoice amount, beneficiary Taxpayer Identification Number, paying party Taxpayer Identification Number, date of making out an invoice, drawer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310652992.1A CN104700305A (en) | 2013-12-05 | 2013-12-05 | Method for acquiring two-dimensional code from optional input frame of Android platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310652992.1A CN104700305A (en) | 2013-12-05 | 2013-12-05 | Method for acquiring two-dimensional code from optional input frame of Android platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104700305A true CN104700305A (en) | 2015-06-10 |
Family
ID=53347395
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310652992.1A Pending CN104700305A (en) | 2013-12-05 | 2013-12-05 | Method for acquiring two-dimensional code from optional input frame of Android platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104700305A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106951237A (en) * | 2017-03-09 | 2017-07-14 | 江苏智联天地科技有限公司 | A kind of bar code scan transmission method based on Android frameworks |
CN107123007A (en) * | 2017-05-10 | 2017-09-01 | 百望金税科技有限公司 | A kind of easy billing method and system |
CN113095450A (en) * | 2021-03-24 | 2021-07-09 | 东风电驱动系统有限公司 | Two-dimensional code data acquisition method and system, electronic device and storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1553392A (en) * | 2003-12-19 | 2004-12-08 | 吉林省防伪保真技术产品开发有限公司 | Two-dimensional bar code antifogery bill special seal and antifogery bill information checking network system |
CN1641655A (en) * | 2004-01-07 | 2005-07-20 | 海尔集团公司 | Real-time intelligent quality control and analysis system and quality control and analysis method |
CN101655996A (en) * | 2009-07-20 | 2010-02-24 | 浪潮齐鲁软件产业有限公司 | Method for identifying the authenticity of bills fast |
CN102520838A (en) * | 2010-10-19 | 2012-06-27 | 微软公司 | Scrubbing touch infotip |
CN202694425U (en) * | 2012-07-03 | 2013-01-23 | 江苏省电力公司南京供电公司 | Intelligent inspection device terminal of secondary system device |
CN102929921A (en) * | 2012-09-20 | 2013-02-13 | 腾讯科技(深圳)有限公司 | Information operational method and client |
CN103158395A (en) * | 2012-09-14 | 2013-06-19 | 福建博思软件股份有限公司 | Electronic network anti-fake bills |
CN103207982A (en) * | 2012-01-13 | 2013-07-17 | 鸿富锦精密工业(深圳)有限公司 | Two-dimensional bar code scanning method and system |
CN103390064A (en) * | 2013-08-02 | 2013-11-13 | 中山爱科数字家庭产业孵化基地有限公司 | Literature read interactive system of farmer bookstore |
CN103400098A (en) * | 2013-07-25 | 2013-11-20 | 上海电机学院 | Scanning device and scanning method for scanning bar code invoice |
-
2013
- 2013-12-05 CN CN201310652992.1A patent/CN104700305A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1553392A (en) * | 2003-12-19 | 2004-12-08 | 吉林省防伪保真技术产品开发有限公司 | Two-dimensional bar code antifogery bill special seal and antifogery bill information checking network system |
CN1641655A (en) * | 2004-01-07 | 2005-07-20 | 海尔集团公司 | Real-time intelligent quality control and analysis system and quality control and analysis method |
CN101655996A (en) * | 2009-07-20 | 2010-02-24 | 浪潮齐鲁软件产业有限公司 | Method for identifying the authenticity of bills fast |
CN102520838A (en) * | 2010-10-19 | 2012-06-27 | 微软公司 | Scrubbing touch infotip |
CN103207982A (en) * | 2012-01-13 | 2013-07-17 | 鸿富锦精密工业(深圳)有限公司 | Two-dimensional bar code scanning method and system |
CN202694425U (en) * | 2012-07-03 | 2013-01-23 | 江苏省电力公司南京供电公司 | Intelligent inspection device terminal of secondary system device |
CN103158395A (en) * | 2012-09-14 | 2013-06-19 | 福建博思软件股份有限公司 | Electronic network anti-fake bills |
CN102929921A (en) * | 2012-09-20 | 2013-02-13 | 腾讯科技(深圳)有限公司 | Information operational method and client |
CN103400098A (en) * | 2013-07-25 | 2013-11-20 | 上海电机学院 | Scanning device and scanning method for scanning bar code invoice |
CN103390064A (en) * | 2013-08-02 | 2013-11-13 | 中山爱科数字家庭产业孵化基地有限公司 | Literature read interactive system of farmer bookstore |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106951237A (en) * | 2017-03-09 | 2017-07-14 | 江苏智联天地科技有限公司 | A kind of bar code scan transmission method based on Android frameworks |
CN107123007A (en) * | 2017-05-10 | 2017-09-01 | 百望金税科技有限公司 | A kind of easy billing method and system |
CN113095450A (en) * | 2021-03-24 | 2021-07-09 | 东风电驱动系统有限公司 | Two-dimensional code data acquisition method and system, electronic device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8746568B2 (en) | Data transfer using barcodes | |
US10832037B2 (en) | Method and apparatus for detecting image type | |
US10867143B2 (en) | Systems and methods for age-restricted product registration | |
US10867144B2 (en) | Systems and methods for point of sale age verification | |
CN106961632B (en) | Video quality analysis method and device | |
CN113129012B (en) | Payment data processing method, device, equipment and system | |
US10904421B2 (en) | Method and system for generation of images based on biorhythms | |
WO2014194827A1 (en) | Method and device for mobile terminal to process visualization graphics code | |
EP4148618A1 (en) | Recognition method and device, security system, and storage medium | |
CN103973550A (en) | Method, system and device for rapidly and intelligently identifying instant messaging application ID (identity) number and carrying out instant messaging | |
CN110098995A (en) | Information processing method, information display method, device, electronic equipment and server | |
CN103455580A (en) | Information recommending method and information recommending device | |
CN104700305A (en) | Method for acquiring two-dimensional code from optional input frame of Android platform | |
CN102568049B (en) | Method, device and system for sending student card reading data | |
CN103546551B (en) | Application software smart download methods, devices and systems | |
KR101744696B1 (en) | Method, device, program and recording medium for filtering information | |
CN108848404B (en) | Two-dimensional code information sharing system of mobile terminal | |
CN112765584B (en) | Two-dimensional code terminal verification and cancellation management method, device and equipment | |
CN105022746B (en) | A kind of method, server and system that character library generates | |
CA3115293A1 (en) | Systems and methods for age-restricted product activation | |
CN110580423B (en) | Personalized configuration method and device of intelligent equipment, electronic equipment and storage medium | |
CN111143740B (en) | Information processing method and device and electronic equipment | |
CN110347597B (en) | Interface testing method and device of picture server, storage medium and mobile terminal | |
CN114650439A (en) | Information monitoring method, terminal, server and computer readable storage medium | |
CN113890754A (en) | Data transmission method, terminal, system and readable storage medium |
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: 20150610 |
|
RJ01 | Rejection of invention patent application after publication |