Could you consider adding that feature in the next update? It will help reduce the time spent scanning QR codes. Instead of scanning each QR code individually, we could scan and read multiple QR codes in one scan.
ScanView extention depends on Zxing library, zxing library doesnât support this feature as far as I know, but suppose the feature exists, how do plan to index the scanned results to the corresponding qr code?
create a mapping system that links scanned results to the corresponding QR codes based on the chosen identification method. This mapping should be dynamic to handle different numbers of QR codes in each scan and store these results in a ListView.
I have seen some tools that can recognize multiple QR codes at once, with each position being a QR code recognition frame. After the recognition is completed, the data will be written to a list
- Yes itâs
- It can be done to (I made an app to register participants, take attendance, and ask questions (both audio and text) dynamically for a talk I gave at a university ussing it).
- You talk as if you know how to do it, but itâs actually more complex.
- It can be scanned continuously, the
library
has no limitations in this regard, the limitations are only in knowledge, insight and technique.
- If you re-read this post You will find that the extension has the
stop
andstart
option, as well as that it is about putting it in avertical arrangement
.
Then, create a new screen, put a Verctical Arrangement
and a Horizontal Arrangement
, On the vertical one sets the scanner, on the horizontal one the scann button.
-
Every time the button is pressed,
start
scanning > getresult
>stop
scanning > do thechecks
andoperations
you need with result >start
scanning (again). -
That way the scan arrangement never stops scanning (as it is always visible).
-
When you close the screen (necessary so that the camera doesnât continue scanning and finishes the process properly), make sure that all the data you needed has been saved correctly.
About your Mapping System:
- If you scan a QR it gives you a
result
, that QR (with thatresult
) can be easily recreated, so you donât need to âmapâ anything. it is enough to assign a âTAGâ or âTITLEâ to that result, whether it is in aTinyDB
orListVIew
.
Ex: QR_from_My_Dog = Result of scanning. And if you need de âimage QRâ again, just create it
- Obviously it must be dynamic, because you will never know (from continuous scanning) how many results you will have.
But all this will depend on the particular need of your specific case.
Recommendation:
-
When it comes to scanning, you should always, always, always, always, take security seriously, perform security checks, especially in terms of the result obtained, because literally anything can be coded (even malicious code).
-
Make sure that what you scan is a QR and not a PDF417 or ISN, etc. As well as that it is compatible with the type of data that corresponds to your case (number, text, link, bool, etc.), whether or not it has the characters you need (@/*±_ ;).
Ex:
-
What if your app needs to scan just one character? (CHAR) = â
a
â and someone with bad intentions puts âABCDEFG
â or â3
â or âTrue/False
â, etc. -
As well as if you are working with BDD Sql and it makes a
SQL injection
, or in your form where it should say theNationality
you see âPownyâ.
From with the for the
Yes it does!
Friend⊠You canât imagine what this extension means to me, itâs not just because of the fact that it scans all kinds of formats
, but the fact that it shows what kind of format
I scan⊠Itâs enough!, because as I said above, with it you can do all kinds of checks and logic necessary to maintain the integrity and security of any application, program or system.
Yeah, obviously it would be better to be able to filter/choose the type of format to scan, and blah blah blah.
- But a rescued dog doesnât count its fleas
Iâm currently working on a way to create/recreate the WhatsappWeb login style.
- To sign in from your phone to a computer, but respect the privileges, roles, and UI of the user signing in.
Ex: administrator, data scientis, professor, student, etc.
Broadly speaking, it doesnât seem difficult or complicated, but at the level of Backend, security and integrity of the platform⊠Yes, it is.
Especially when talking about sensitive or critical data (view, CRUD, transfer, etc.), or automation processes (industrial, iot, etc.).
The ML Kit off google itâs good, but i dont trust in google, itâs like I dont see your data
I use similar way did my app, but somehow it struggle in 2nd/3rd scan, the first scan was fast and easy,
but after I got first QR result, which use âstop scanningâ, and back to scan screen again, I can see the camera refocus a lot but not get any result,
I have to restart my page to get next result, but sometime, itâs work (very rare) and quick got 2nd result, I try use different device, but same problem keep happened, I have no idea why.
I was tried to close the autofocus , but itâs not work.
some data infomation use chinese name, so I put note on it.
this is the video to show the situation, the demo device is Samsung S23 Ultra, I think this device which has high ability for camera focus, but still had problem on it.
and sorry for my poor English, I try best to use translat to describe.
Sorry for the delay, try to put the âStopScanâ in the beginning, then do all the stuffs.
- The camera still scanning while you do the cheks and all the thinks
That carry many problemas with memory and computation.
Happy Koding my Friend, all the best with your work, you mentioned you are working on a WhatsApp related project, I can suggest you this link and I think it can be helpful to you:
Thanks for reply, I try this suggestion but not work,
And I think I found the problem from, the scan has not allow same qr code scan twice (or some kind time delay for same qr code), thatâs why that scan work everytime I switch page back, itâs clean memory when I left scan page.
The âstopscanâ funtion wonât clean the memory, so when âstartscanâ again, it still block the first Qr result. I not found funtion to adjustment that part.
I tried to replicate your error, but on the devices I have at my disposal I was able to do so, so it could be something according to your device, android API, etc.
- Instead, you/we could take the following approach.
1- We know that the Arrangement container the Scanner is a vertical one.
2- We know that it must be âupdatedâ in order for it to work as it should (or want).
3- We know that Appinventor does not have or contains an âupdate componentâ option, and the existing ones are not optimized.
4- Then we have to âcreateâ and âdestroyâ the component, dynamically, so that it is âupdatedâ âŠ
5- And we know that the only way to do it or do something like that, is through âDynamic Componentsâ.
- ThenâŠ
1- In order for the dynamic components to work as they should, we need a container.
2- Then create 1 Vertical Arrangement [AK: VAC] (Statically: via UI), To contain your dynamic component.
3-- Create a dynamic component Vertical Arrangement
as a/for the Scanner Container
(AK: VASC) insidie the VAC
youâve already created.
4- Inside VASC create (dynamically) the Scanner component and start scan
5- Store the scan in a List (Global ListScans) then stop scan
6- Then destroy (dynamically) the created VASC
7- LOOP (Step 3 to 6)
-
In this way, the Arrangement will be âupdatedâ and will allow the continuous scanning of the same or different QRâs, etc.
-
I recommend you approach this procedurally and synchronously (to avoid spaghetti code and buffer and memory problems)
-
Example:
1- Create a screen that contains a button that says Products Scanning
(Main Screen)
2- Create a screen that contains 2 buttons that says Start Scan
and another Stop Scan
. with VAC (Scan Screen)
3- Create the procedures;C_VASC
(Create Vertical Arrangement conteiner for the scann component), C_SC
(Create Scanner inside VASC), D_All
(Destroy all).
In C_VASC:
- Create VASC And passes its ID as a parameter to C_SC
- Use the ID of VASC to create the Scanner component inside of it, using his ID
In C_SC:
- Create de component Scanner > Perform de Scan > Stop Scan > Store it in Global ListScans > And passes its ID With VASC ID as a parameters to D_ALl
In D_All:
-
If
button âStop Scanâ itâs not pressedThen
(case) > Destroy SC by ID > Destroy VASC by ID > Create a new VASC > Create a new SC
Else
(case) > Destroy SC by ID > Destroy VASC by ID > do what you need with Scaned values stored in Globas ListScans > Close Screen > Go to Screen what you want. -
That way you create a quasi-infinite Loop, which creates and destroys the components by performing the selected tasks in each one.
-
I donât recommend creating it through For, Do While, etc (Loops). Because more resources (time and processing) are consumed.
-
The procedural approach (synchronous and asynchronous) is the best for appinventor (because of the block issue)
-
But always remember that each procedure should do a single and unique task.
You can have a main procedure that calls other procedures synchronously or asynchronously, Ex:
-
Caller_Sync_Proc: Call Proc1 > Proc2 > Proc3 > Proc[n+1] when Proc1 finish, then execute Proc2 and so on.
-
Caller_Async_Proc: Call Proc1 > Proc2 > Proc3 > Proc[n+1] then execute all Proc[n] at the same time.
-
Through this procedural approach, your code (blocks) will always be ordered, and by following method 1 procedure 1 task, you will always have control of errors in your code, because you will know which task is the problem. It will also allow you to have your blocks ordered in a hierarchical way and in order or execution time.
-
Cause, you will always know which procedure calls another procedure, which procedure does/perform âxâ task, as well as reuse blocks (procedures) that are common to other procedures.
Try and let me know if it worked.
From with to the
- I forgot to mention, sometimes bugs do not come from logic, but from the technique and the order of execution, so it is important to discern when a synchronous and asynchronous procedure can and should be done.
One way you can do this is:
- Create the Sync_Proc that create the VASC, when you get ID of that VASC, you can call a Async_Proc that give format to tath VASC (P_VASC), Thus, in the background it formats VASC, it continues with the task of calling C_SC, (same aproach with F_SC).
That way you divide the execution into âbranchesâ or âparallel tasksâ
So, while a synchronous procedure does one task and then the other, an asynchronous procedure can do tasks at the same time.
- The secret is to know how and when to do it.
In this case, you would not be able to Run C_VASC and C_SC asynchronously (parallel), as the C_SC depends on C_VASC ID, so C_VASC must be executed before C_SC.
But you can make the procedures that âgive formatâ to those components run asynchronously, because by having the IDs of the components, the size, colors, fonts, etc. It can be rendered at another time without hindering the task that the other procedures must do.
Yes but im trying to make a âwhatsapp web loginâ style, to login in a desktop app.
Thank you very much for making ScanView.apk.
I made an app with appinventor using ScanView.apk.
Some phones have both front and rear cameras working well.
Some phones have front cameras that donât work, but rear cameras that work well. Do you know why?
Meanwhile, when I ran ScanViewRizu.apk,
I could see that both front and rear cameras worked well.
I looked at ScanView-v2.1.aia,
and I checked it thoroughly, but I couldnât find the reason.
Do you know why?
Thank you for the extension and blocks!
BUT my 'SetMaskColor" block does not work.
#FFFFFF00
#FFFFFF50
#F7625701
Can you show me some examples?