問題描述
我目前正在研究在 Android 中構建一個鬧鐘應用程序.我對使用 QR 碼進行編程完全陌生.我對此一無所知.但現在,我想找出創建具有二維碼功能的應用程序的可行性.(我有兩周的時間來構建它)
I am currently researching to build an alarm clock application in Android. I am utterly and completely new to programming with QR codes. I know nothing about it. But right now, I want to find out the feasibility of creating an application with QR code functionality. (I have two weeks to build this)
我的第一個問題是:我是否必須在代碼中自己處理相機,即我是否必須啟動它然后關閉它然后處理 QR 圖像?
My first question is: would I have to handle the camera myself in the code i.e. do I have to fire it up and then close it and then process the QR image?
第二問:我如何創建二維碼,然后當我掃描它時,它怎么知道它掃描的是正確的?我想打印一個,放在廚房或浴室,然后當鬧鐘響起時,我必須在鬧鐘關閉之前掃描代碼.
2nd Q: How would I create the QR code and then when I scan it, how does it know it scanned the right one? I want to print one, place it in the kitchen or bathroom and then when the alarm goes off, I have to scan the code before the alarm turns off.
推薦答案
在 Android 中這大約需要 10 分鐘:
In Android this requires about 10 minutes:
https://github.com/zxing/zxing/wiki/Scanning-Via-Intent
這篇關于使用相機讀取二維碼 - Android的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!