This simple test app generates a qr code, displays the code and then decodes it to verify that the qr code has captured the input text correctly. Works fine from Ai2 Companion (latest version) but the apk version closes immediately without displaying anything but the message "Unfortunately, GRQuen1 has stopped".
The decoder is from VKNOW360
My Android version is 6.0
According to the developer, the input to the decoder must have an absolute path.
The variable "image" returns /storage/emulated/0/My Documents/Pictures/filename which I believe is an absolute path.
Yes, I am using two different QR extensions. The QR Code generator is from Zhangzqs and it works fine. However, this extension does not have a QR decoder, so I am trying to use the decoder from VKNOW360. I am not using the VKNOW360 QR generator because I cannot get it to work. (I believe the problem with the VKNOW360 generator is that it asks for a path to a logo but I am not using a logo in my app. Can this block be used without a logo?)
It was suggested that I add the ai2 Barcode Scanner which I did. I added it to the Screen in the Designer but since in my app, I am providing the location of the QR Code to the decoder bock instead of scanning a QR image, I did not add any scanner code to my blocks.
Before I added the Scanner the app worked from the Companion and would build an apk but running the apk, the app would close.
After adding the Scanner, the app worked from the Companion as before but I could not build an apk. I got the enclosed message.
VKNOW360 -- thanks for the information about passing the empty string. Your GenerateBarcode block now works. The decoder also works (as before) with the Companion. However, I am still unable to get the decoder to work as an apk. The app will compile if I do not add a barcode scanner but after generating the QR image, the app closes when it tries to execute the Decode block. If I add the barcode scanner the app will not compile.
Yes, I added the request for Write permission to a screen initialize block. I did not add a Read permission request because what I have read indicates that Write permission automatically grants read permission as well.
In addition, I added an ai2 file component, which is supposed to automatically get read/write permission.
The code compiles and when it runs I can see that the QR code image is produced but then the app immediately closes without decoding.
Tried new decoder from Com.Silver.scanview.aix with same results.
Both decoders (Com.Sunny.qr.aix and Com.Silver.scanview.aix) work from Companion (2.63) but the app will not compile with either one. The block with both decoders is:
Thank you. My aia is less that 5MB, I only have 1 screen and there are no errors or alerts showing, so the common known reasons for build failure are not present. Do you know of any way to verify that it is indeed an Android 6 issue or a way of troubleshooting (I do not have access to another version of Android. But since I have supplied the aia, could someone else try building the app?) What gets me is that I observe the same behavior with decoders from two different developers.
Thank you for checking Android 7 and 10. Obviously you were able to compile the aia. My problem is that I cannot compile it from my laptop (Win 10 with the Firefox browser) even though the App Inventor compiler only knows that the target OS is Android but not which version. The compiler does not know that I have version 6.0. (also, the app runs fine on 6.0 from the Companion)
I have compiled numerous ai2 apps successfully and this is the only one that has failed. Can you suggest any other things that I could check?
.