I am using a Bluetooth barcode scanner with my APP to scan serial number barcodes and display the information about the scanned code. The database it searches is loaded into arrays which are initialized in Sub Globals. The arrays are loaded from a file when the program starts in Sub Activity_Create(FirstTime As Boolean).
My problem is every time the barcode scanner is either turned on, or times out and turns itself off the program re-initializes the arrays. I tried loading the database in Activity_Create in the “If FirstTime” and I ended up with empty arrays. I later took it out of the “If FirstTime” and it re-loads the database from the file, but then I would lose any changes unless I remember to save them. I am trying to find a way where the Bluetooth scanner will not cause the arrays to reinitialize when turned on/off.
My problem is every time the barcode scanner is either turned on, or times out and turns itself off the program re-initializes the arrays. I tried loading the database in Activity_Create in the “If FirstTime” and I ended up with empty arrays. I later took it out of the “If FirstTime” and it re-loads the database from the file, but then I would lose any changes unless I remember to save them. I am trying to find a way where the Bluetooth scanner will not cause the arrays to reinitialize when turned on/off.