How to generate QR code by self programming - Printable Version +- phyphox Forums (https://phyphox.org/forums) +-- Forum: Discussion (https://phyphox.org/forums/forumdisplay.php?fid=1) +--- Forum: Experiments and Ideas (https://phyphox.org/forums/forumdisplay.php?fid=4) +--- Thread: How to generate QR code by self programming (/showthread.php?tid=1387) |
How to generate QR code by self programming - mxxsir - 07-15-2021 hello everyone. Now I have a file(named str1.phyphox) on my computer. I want to use JAVA to create the QR code of this file, just as the phyphox Web-editor creates offline QR code. I have read it carefully https://phyphox.org/wiki/index.php?title=Transferring_ phyphox_ Experiments & oldid = 20727. I also searched the related topics in the forum, but I still couldn't realize my idea (frustratingly, scanning QR code, always "indicates QR-code failure", which may be caused by CRC32). Who can help me and share a sample program? Through the study of this function, I hope that phyphox APP can share .phyphox experiment by QR code, teacher can post QR code to students in the future. Here is my nasty code and efforts, thank you. [attachment=397] RE: How to generate QR code by self programming - Sebastian Staacks - 07-15-2021 Wow, that would probably be helpful for others, too. Especially because the editor generates rather large files that make offline QR codes impractical as they need to be split into multiple codes. When doing it manually, you can usually fit most things into a single QR code. (BTW: You can strip all the editor:... attributes to save on file size as they are not interpreted by phyphox, but only by the editor when loading the file again, which will most likely never happen from the QR code.) I did not have the chance to read and try your entire code, but at a first glance, I have the following remarks:
You can also see the receiving end here, if that helps: https://github.com/phyphox/phyphox-android/blob/720caa56d391b316f3732c1fdf5531efea5b25ae/app/src/main/java/de/rwth_aachen/phyphox/ExperimentList.java#L2130 Also, as you might try to compare your results to the one from the editor, be aware that phyphox allows you to strip the header of the zip file. You can only include the binary data, followed by a data descriptor, which is what the editor does. However, this is just a warning that the editor goes one step further - you can include a full zip file and should probably try this first. RE: How to generate QR code by self programming - mxxsir - 07-20-2021 Thank you very much for your answer! With the help of a professional programmer, offline QR code has been implemented. Thanks! RE: How to generate QR code by self programming - Sebastian Staacks - 07-21-2021 Great, happy to hear it. If you would like to share your code, you can either just upload it here or send it to us via mail. It might be interesting to other users, too. RE: How to generate QR code by self programming - mxxsir - 07-23-2021 Thank your encouragement! The code is rough and messy, and the comments are in Chinese. my English is poor. The .phyphox file cannot be more than 1.5k bytes, it will generate a blank jpg. RE: How to generate QR code by self programming - Jens Noriʇzsɔɥ - 07-23-2021 A QR code could store up to 2953 Bytes at low error correction level (or less for medium, quartile or high). Perhaps this is the reason… Does your code support multiple QR symbols? |