Android App Inventor 条码扫描
所以我看到有很多关于 Android 应用程序中的条形码扫描的问题,但这个问题与 App Inventor 中的条形码扫描有关。
我按照网上找到的教程创建了一个条形码扫描应用程序,您按下一个按钮,它就会启动扫描仪,然后根据结果,屏幕上的第二个按钮启动一个带有传递变量的 URL。我自己在 App Inventor 中开发了该应用程序,因此我可以根据自己的需要对其进行修改,但我遇到了问题。条形码扫描仪启动,扫描成功(找到产品确认),但返回主屏幕后,resultLabel.Text 值未更改,resultActionButton.Text 值也未更改。下面是我的应用程序的框图以及我遵循的教程的链接。
先感谢您!
这是框图图像:
教程链接:http://androidadvice.blogspot.com/2010/09/app -inventor-sample-project-barcode.html
So I see there are a lot of questions regarding Barcode Scanning in Android applications, but this one is relating to Barcode Scanning in the App Inventor.
I followed a tutorial I found online to create a barcode scanning application where you press a button, it launches the scanner and then based on the results, the second button on the screen launches a URL with a passed variable through it. I developed the app myself in App Inventor so I could modify it to my needs, but I have encountered a problem. The barcode scanner launches, scans successfully (Product Found confirmation), but then upon returning to the main screen, the resultLabel.Text value is not changed and neither is the resultActionButton.Text value. Below is the block diagram of my application and a link to the tutorial I followed.
Thank you in advance!
Here is the block diagram image:
Link to tutorial: http://androidadvice.blogspot.com/2010/09/app-inventor-sample-project-barcode.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试通过tinydb传递数据。
例如,扫描后事件> tinydb1.storevalue 标签:resultLabel(desired_text) 要存储的值:结果
将 resultLabel.text 设置为tinydb1.getvalue 标签:resultLabel(desired_text)
和 notifier1.showalert 文本:启动扫描后活动;这样你就知道该事件正在被调用
try to pass the data through a tinydb.
for instance, afterscan event > tinydb1.storevalue tag:resultLabel(desired_text) value to store: result
set resultLabel.text to tinydb1.getvalue tag: resultLabel(desired_text)
and notifier1.showalert text:launched afterscan activity; so that you know the event is getting called