Reputation: 55
I have a barcode scanning app where you can label your barcodes before you scan them. I want to make it so that when you label and scan something, it shows up in a list with the label you gave the barcode, and saves it. I put up my code for the entire project on github, please help me out as soon as possible. The class for my list is called list, where you label the barcode is mainactivity, the barcode shows up in result page, and the stuff where my list is populated from is the User class, which is just a bunch of filler right now.
Upvotes: 1
Views: 67
Reputation: 3584
You need to do some smaller modifications : Step 1 - Create a DataModel having all your scanner results. For Example -
class ScannerResultModel{
int num;
String format;
String formatname;
String Label
}
Step 2 - Maintain a ArrayList of this model in MainActivity, so whenever you get a new result just add to this arrayList.
Step 3 - Implement parcelble to this model, so that you can pass this whole arrayList to the ResultActivity by putting in intent.
Now you can receive the list of all data in Result Activity. Hope it will help you :)
Upvotes: 2