database - zxing android creating a list of scanned codes -
so building app keeps track of items on loan students. want able scan barcode on student card, , scan barcode on item borrowing. information should added "loan" database table.
this should able done multiple times, there more 1 student borrowing items @ 1 time. when finished, ui of android app have list of student numbers retrieved student cards alongside item borrowing.
i have embedded zxing app , scanning barcodes. have reached point cannot think how proceed next stage.
i think main problem onactivityresult retrieving read data, , being overwritten every new barcode scan. there way can scan multiple barcodes , save data of each without overwriting?
from scan.java:
public void onactivityresult(int requestcode, int resultcode, intent intent) { intentresult scanningresult = intentintegrator.parseactivityresult(requestcode, resultcode, intent); if (scanningresult != null) { //we have result string scancontent = scanningresult.getcontents(); string scanformat = scanningresult.getformatname(); formattxt.settext("format: " + scanformat); contenttxt.settext("content: " + scancontent); } else { toast toast = toast.maketext(getapplicationcontext(), "no scan data received!", toast.length_short); toast.show(); } } the table loans information stored in. dbhelper.java:
private static final string sql_create_table_onloan = "create table " + table_onloan + "(" + column_onloan_loan_id + " integer primary key autoincrement, " + column_onloan_kit_number + " text not null, " + column_onloan_borrower_number + " text not null, " + column_onloan_date_borrowed + " date not null " + ");";
Comments
Post a Comment